public void TestRemoveInvalidIndex() { StubCollection testedCollection = new StubCollection(); testedCollection.RemoveAt(0); Assert.Fail("The RemoveAt(index) did not throw an Exception although an invalid index was passed."); }
public void TestRemoveInvalidIndex() { StubCollection testedCollection = new StubCollection(); Assert.Throws <ArgumentOutOfRangeException>(() => testedCollection.RemoveAt(0)); //Assert.Fail( "The RemoveAt(index) did not throw an Exception although an invalid index was passed." ); }