public void ShouldThrowExceptionParametersAreNullWhenSaving() { EntitiesAccessor target = EntitiesAccessor.Instance; string filename = null; target.SaveAssemblyElement(filename, null); target.SaveConfiguration(filename, null); target.SaveWeaveSpecification(filename, null); }
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); }