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) { } }
public void ConfigurationXRemoveLastAssemblyFromListLeavesZeroLengthList() { WcfUnitConfiguration cfg = new WcfUnitConfiguration(); cfg.AddAssembly("one"); cfg.RemoveAssembly(0); Assert.AreEqual <int>(0, cfg.assembly.Length); }
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); }