Esempio n. 1
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. 2
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. 3
0
        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);
        }