public void Add_AddsAnItem() { var bag = new CountingBag<string>(new[] { "a" }); var originalCount = bag.Count; bag.Add("b"); Expect.The(bag.Count).ToEqual(originalCount + 1); }
public void Add_AddsAnItem() { var bag = new CountingBag <string>(new[] { "a" }); var originalCount = bag.Count; bag.Add("b"); Expect.The(bag.Count).ToEqual(originalCount + 1); }
public void Add_IncrementsDuplicateCount() { var bag = new CountingBag<string>(new[] { "zzz", "zzz", "foo" }); var fooCount = bag.GetCountFor("foo"); Expect.The(bag.Count).ToEqual(3); Expect.The(fooCount).ToEqual(1); bag.Add("foo"); Expect.The(bag.GetCountFor("foo")).ToEqual(fooCount + 1); }
public void Add_IncrementsDuplicateCount() { var bag = new CountingBag <string>(new[] { "zzz", "zzz", "foo" }); var fooCount = bag.GetCountFor("foo"); Expect.The(bag.Count).ToEqual(3); Expect.The(fooCount).ToEqual(1); bag.Add("foo"); Expect.The(bag.GetCountFor("foo")).ToEqual(fooCount + 1); }