public void ContainsReturnsFalseIfItemNotInHive(ReadOnlyCollectionTestArgs <T, TSize, THive> args) { if (!args.ExpectedItems.Contains(default(T))) { Assert.IsFalse(args.Hive.Contains(default(T))); } }
public void ContainsReturnsTrueIfItemInHive(ReadOnlyCollectionTestArgs <T, TSize, THive> args) { int itemIndex = 0; foreach (T expectedItem in args.ExpectedItems) { Assert.IsTrue(args.Hive.Contains(expectedItem), "Contains '{0}' (item #{1})", expectedItem, itemIndex); itemIndex++; } }
public void TryGetCountAlwaysReturnsTrue(ReadOnlyCollectionTestArgs <T, TSize, THive> args) { TSize count; Assert.IsTrue(args.Hive.TryGetCount(out count)); }
public void CountReturnsNumberOfItemsInHive(ReadOnlyCollectionTestArgs <T, TSize, THive> args) { Assert.AreEqual(args.ExpectedItems.Count, args.Hive.Count); }