Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public void CanSaveAndLoadAssemblyElementTest()
        {
            EntitiesAccessor target = EntitiesAccessor.Instance;

            string filename = "assemblyElement.xml";

            AssemblyElement ae = new AssemblyElement();

            Assert.IsTrue(target.SaveAssemblyElement(filename, ae), "Save function for SaveAssemblyElement did not return true");
            Assert.IsTrue(System.IO.File.Exists(filename), "File {0} did not exists while it should be wrtten.", filename);

            AssemblyElement actual = target.LoadAssemblyElement(filename);

            Assert.IsNotNull(actual, "Could not read file {0}.", filename);
            Assert.AreEqual(ae, actual, "Composestar.Repository.EntitiesAccessor.LoadAssemblyElement did not return the expected value.");
        }