public void CheckResolutionPathsDoNotContainPrivateAssembliesPathTest() { TestSourceHost isolatedHost = new TestSourceHost(null, null, null); List <string> paths = isolatedHost.GetResolutionPaths(Assembly.GetExecutingAssembly().FullName, true); Assert.IsFalse(paths.Contains(Constants.PublicAssemblies) || paths.Contains(Constants.PrivateAssemblies)); }
public void GetResolutionPathsShouldAddTestPlatformFolderPath() { // Setup TestSourceHost sut = new TestSourceHost(null, null, null); // Execute List <string> result = sut.GetResolutionPaths("DummyAssembly.dll", isPortableMode: false); // Assert Assert.AreEqual(result.Contains(typeof(AssemblyHelper).Assembly.Location), false); }
public void GetResolutionPathsShouldAddAdapterFolderPath() { // Setup TestSourceHost sut = new TestSourceHost(null, null, null); // Execute List <string> result = sut.GetResolutionPaths("DummyAssembly.dll", isPortableMode: false); // Assert Assert.IsFalse(result.Contains(typeof(TestSourceHost).Assembly.Location)); }
public void GetResolutionPathsShouldNotAddPublicAndPrivateAssemblyPathInPortableMode() { // Setup TestSourceHost sut = new TestSourceHost(null, null, null); // Execute // It should not return public and private path if it is running in portable mode. List <string> result = sut.GetResolutionPaths("DummyAssembly.dll", isPortableMode: true); // Assert Assert.AreEqual(result.Contains(VSInstallationUtilities.PathToPublicAssemblies), false); Assert.AreEqual(result.Contains(VSInstallationUtilities.PathToPrivateAssemblies), false); }
public void GetResolutionPathsShouldAddPublicAndPrivateAssemblyPath() { // Setup TestSourceHost sut = new TestSourceHost(null, null, null); // Execute // It should return public and private path if it is not running in portable mode. List <string> result = sut.GetResolutionPaths("DummyAssembly.dll", isPortableMode: false); // Assert if (!string.IsNullOrWhiteSpace(VSInstallationUtilities.PathToPublicAssemblies)) { Assert.IsTrue(result.Contains(VSInstallationUtilities.PathToPublicAssemblies)); } if (!string.IsNullOrWhiteSpace(VSInstallationUtilities.PathToPrivateAssemblies)) { Assert.IsTrue(result.Contains(VSInstallationUtilities.PathToPrivateAssemblies)); } }