public void GetFilesFromCurrentAssembly_NoConfigFilesFound() { var configurationFileLocator = new ConfigurationFileLocator(); var files = configurationFileLocator.GetFilesFromCurrentAssembly (); Assert.That (files, Is.Empty); }
public void GetFilesFromCurrentAssembly() { var configurationFileLocator = new ConfigurationFileLocator(); var orignialAssemblyLocation = GetOrignialAssemblyLocation(); var sampleConfigLocation = Path.Combine (orignialAssemblyLocation, "Config\\SampleConfig.xml"); var expectedConfigLocation = Path.Combine (Path.GetDirectoryName(configurationFileLocator.GetType().Assembly.Location), "config.injectioncop"); try { File.Copy (sampleConfigLocation, expectedConfigLocation); var files = configurationFileLocator.GetFilesFromCurrentAssembly (); Assert.That (files, Contains.Item (Path.GetFullPath (expectedConfigLocation))); } finally { File.Delete (expectedConfigLocation); } }