Skip to content

Commit

Permalink
Fix lib tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saintentropy committed Dec 12, 2019
1 parent 2fcd3b5 commit 7ae1302
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/DynamoCoreTests/DSLibraryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ public void TestAddStandardLibraryPath()
List<string> customPackageFolders = CurrentDynamoModel.PreferenceSettings.CustomPackageFolders;

// Test that the default number of folders is correct
Assert.IsTrue(customPackageFolders.Count == 1);
Assert.IsTrue(customPackageFolders.Count == 2);

// Test that the path is added as expected
CurrentDynamoModel.AddPackagePath(TestDirectory, "");
Assert.IsTrue(customPackageFolders.Count == 2);
Assert.IsTrue(customPackageFolders.Count == 3);

// Test that the path is not duplicated
CurrentDynamoModel.AddPackagePath(TestDirectory, "");
Assert.IsTrue(customPackageFolders.Count == 2);
Assert.IsTrue(customPackageFolders.Count == 3);
}

[Test]
Expand All @@ -232,21 +232,21 @@ public void TestAddDllLibraryPath()
List<string> customPackageFolders = CurrentDynamoModel.PreferenceSettings.CustomPackageFolders;

// Test that the default number of folders is correct
Assert.IsTrue(customPackageFolders.Count == 1);
Assert.IsTrue(customPackageFolders.Count == 2);

string filename = @"DLL.dll";
string packagePath = Path.Combine(TestDirectory, @"pkgs\Custom Rounding\extra");
string libraryPath = Path.Combine(packagePath, filename);

// Test that the full file path is added as expected
CurrentDynamoModel.AddPackagePath(packagePath, filename);
Assert.IsTrue(customPackageFolders.Count == 2);
Assert.IsTrue(customPackageFolders.Count == 3);
int count = customPackageFolders.Where(s => s == libraryPath).Count();
Assert.IsTrue(count == 1);

// Test that the full file path is not duplicated
CurrentDynamoModel.AddPackagePath(packagePath, filename);
Assert.IsTrue(customPackageFolders.Count == 2);
Assert.IsTrue(customPackageFolders.Count == 3);
count = customPackageFolders.Where(s => s == libraryPath).Count();
Assert.IsTrue(count == 1);
}
Expand Down

0 comments on commit 7ae1302

Please sign in to comment.