The EmptyMatcher object is used as a delegate type that is used when no user specific matcher is specified. This ensures that no transform is resolved for a specified type, and allows the normal resolution of the stock transforms.
Inheritance: Matcher
Ejemplo n.º 1
0
        public void Matches_should_dispose_of_enumerator()
        {
            var subj = new EmptyMatcher();
            var item = new PHasDisposableEnumerator();

            subj.Matches(item);
            Assert.True(item.LastEnumerator.IsDisposed);
        }
Ejemplo n.º 2
0
        public void Matches_should_detect_non_empty_nominal()
        {
            var subj = new EmptyMatcher();

            Assert.False(subj.Matches("abc"));
        }
Ejemplo n.º 3
0
        public void Matches_should_allow_null_and_detect_nominal()
        {
            var subj = new EmptyMatcher();

            Assert.False(subj.Matches((string)null));
        }
Ejemplo n.º 4
0
        public void Matches_should_detect_empty_nominal()
        {
            var subj = new EmptyMatcher();

            Assert.True(subj.Matches(""));
        }