示例#1
0
        public void ConfigurationXRemoveAssemblyFromEmptyListThrowsInvalidOperationException()
        {
            WcfUnitConfiguration cfg = new WcfUnitConfiguration();

            cfg.AddAssembly("one");
            cfg.RemoveAssembly(0);

            try
            {
                cfg.RemoveAssembly(0);
                Assert.Fail("Expected exception not thrown");
            }
            catch (InvalidOperationException)
            {
            }
        }
示例#2
0
        public void ConfigurationXRemoveLastAssemblyFromListLeavesZeroLengthList()
        {
            WcfUnitConfiguration cfg = new WcfUnitConfiguration();

            cfg.AddAssembly("one");

            cfg.RemoveAssembly(0);

            Assert.AreEqual <int>(0, cfg.assembly.Length);
        }
示例#3
0
        public void ConfigurationXRemoveFirstAssemblyFromListOfTwoAssembliesRemovesAssembly()
        {
            WcfUnitConfiguration cfg = new WcfUnitConfiguration();

            cfg.AddAssembly("one");
            cfg.AddAssembly("two");

            cfg.RemoveAssembly(0);

            Assert.AreEqual <int>(1, cfg.assembly.Length);
            Assert.AreEqual <string>("two", cfg.assembly[0].fileName);
        }