Beispiel #1
0
        public void Matches_should_not_detect_value_types()
        {
            const int item  = 10;
            const int other = 10;
            var       subj  = new SameMatcher(item);

            Assert.False(subj.Matches(other));
        }
Beispiel #2
0
        public void Matches_should_detect_object_equivalence_nominal()
        {
            var item = new object();
            var subj = new SameMatcher(item);

            Assert.True(subj.Matches(item));
            Assert.Same(item, item);
        }
Beispiel #3
0
        public void Matches_should_detect_object_nonequivalence_nominal()
        {
            var item  = new object();
            var other = new object();
            var subj  = new SameMatcher(item);

            Assert.False(subj.Matches(other));
            Assert.NotSame(item, subj);
        }