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 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 CanSaveAndLoadWeaveSpecificationTest() { EntitiesAccessor target = EntitiesAccessor.Instance; string filename = "weavespec.xml"; WeaveSpecification expected = new WeaveSpecification(); expected.AssemblyName = "test"; WeaveSpecification actual; Assert.IsTrue(target.SaveWeaveSpecification(filename, expected), "Save function for SaveWeaveSpecification did not return true"); Assert.IsTrue(System.IO.File.Exists(filename), "File {0} did not exists while it should be wrtten.", filename); actual = target.LoadWeaveSpecification(filename); Assert.IsNotNull(actual, "Could not read file {0}.", filename); Assert.AreEqual(expected.AssemblyName, actual.AssemblyName, "Composestar.Repository.EntitiesAccessor.LoadWeaveSpecification did not return the expected value."); }