public void Adding_an_item_increases_count_by_one() { var x = new ThePlayers(false); var oldCount = x.count(); x.Add(42, ""); Assert.AreEqual(oldCount + 1, x.count()); }
public void Removing_an_item_reduces_count_but_not_size() { //arrange var x = new ThePlayers(false); x.Add(42, "a"); x.Add(43, "b"); x.Add(44, "c"); Assert.AreEqual(3, x.count()); Assert.AreEqual(5, x.size()); //act x.Remove(43); //assert Assert.AreEqual(2, x.count()); Assert.AreEqual(5, x.size()); }
public void Adding_an_item_to_a_readonly_thing_is_ignored() { var x = new ThePlayers(true); x.Add(42, ""); Assert.AreEqual(0, x.count()); }