コード例 #1
0
        public void Matches_should_detect_item_via_collection_Contains_unless_a_comparer_is_specified()
        {
            var subj       = new ContainsMatcher <string>("c", StringComparer.OrdinalIgnoreCase);
            var collection = new PCollectionWithContains();

            Assert.True(subj.Matches(collection), "should ignore case");
            Assert.Equal(0, collection.ContainsCallCount, "should not be invoked");
        }
コード例 #2
0
        public void Matches_should_detect_item_via_collection_Contains()
        {
            var subj       = new ContainsMatcher <string>("C");
            var collection = new PCollectionWithContains();

            Assert.True(subj.Matches(collection));
            Assert.Equal(1, collection.ContainsCallCount);
        }