public void ShouldThrowExceptionWhenFileNotFound() { EntitiesAccessor target = EntitiesAccessor.Instance; string filename = "doesnotexists.xml"; AssemblyElement ae = target.LoadAssemblyElement(filename); ConfigurationContainer cc = target.LoadConfiguration(filename); WeaveSpecification ws = target.LoadWeaveSpecification(filename); }
public void ShouldThrowExceptionParametersAreNullWhenLoading() { EntitiesAccessor target = EntitiesAccessor.Instance; string filename = null; AssemblyElement ae = target.LoadAssemblyElement(filename); ConfigurationContainer cc = target.LoadConfiguration(filename); WeaveSpecification ws = target.LoadWeaveSpecification(filename); }
public void CanSaveAndLoadConfigurationTest() { EntitiesAccessor target = EntitiesAccessor.Instance; string filename = "config.xml"; ConfigurationContainer cc = new ConfigurationContainer(); ConfigurationContainer actual; Assert.IsTrue(target.SaveConfiguration(filename, cc), "Save function for SaveConfiguration did not return true"); Assert.IsTrue(System.IO.File.Exists(filename), "File {0} did not exists while it should be wrtten.", filename); actual = target.LoadConfiguration(filename); Assert.IsNotNull(actual, "Could not read file {0}.", filename); }