예제 #1
0
 public void ContainsReturnsFalseIfItemNotInHive(ReadOnlyCollectionTestArgs <T, TSize, THive> args)
 {
     if (!args.ExpectedItems.Contains(default(T)))
     {
         Assert.IsFalse(args.Hive.Contains(default(T)));
     }
 }
예제 #2
0
        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++;
            }
        }
예제 #3
0
        public void TryGetCountAlwaysReturnsTrue(ReadOnlyCollectionTestArgs <T, TSize, THive> args)
        {
            TSize count;

            Assert.IsTrue(args.Hive.TryGetCount(out count));
        }
예제 #4
0
 public void CountReturnsNumberOfItemsInHive(ReadOnlyCollectionTestArgs <T, TSize, THive> args)
 {
     Assert.AreEqual(args.ExpectedItems.Count, args.Hive.Count);
 }