public void RemoveMoreElementsThanCollectionHave() { //Arrange IntDataBase db = new IntDataBase(new List <int>() { 1, 2 }); //Act db.Remove(); db.Remove(); //Assert Assert.Throws <InvalidOperationException>(() => db.Remove()); }
public void RemoveManyElements() { //Arrange IntDataBase db = new IntDataBase(new List <int>() { 1, 2, 3, 4 }); //Act db.Remove(); db.Remove(); db.Remove(); //Assert CollectionAssert.AreEqual(new int[] { 1 }, db.Elements); }