Beispiel #1
0
 public void throws_TypeMatcherError_if_empty_and_filter_requested()
 {
     Assert.Throws(typeof(TypeMatcherException), new TestDelegate(() =>
     {
         TypeMatcher emptyInstance = new TypeMatcher();
         emptyInstance.CreateTypeFilter();
     }
                                                                  ));
 }
Beispiel #2
0
        public void clone_returns_open_copy_when_not_locked()
        {
            instance.AllOf(ALL_OF.ToArray()).AnyOf(ANY_OF.ToArray());
            TypeMatcher clone = instance.Clone();

            clone.NoneOf(NONE_OF.ToArray());
            TypeFilter expectedFilter = new TypeFilter(ALL_OF, ANY_OF, NONE_OF);

            assertMatchesTypeFilter(expectedFilter, clone.CreateTypeFilter());
        }
Beispiel #3
0
        public void throws_TypeMatcherError_if_conditions_empty_and_filter_requested()
        {
            Assert.Throws(typeof(TypeMatcherException), new TestDelegate(() =>
            {
                TypeMatcher emptyInstance = new TypeMatcher();
                emptyInstance.AllOf(EMPTY_CLASS_VECTOR.ToArray()).AnyOf(EMPTY_CLASS_VECTOR.ToArray()).NoneOf(EMPTY_CLASS_VECTOR.ToArray());

                emptyInstance.CreateTypeFilter();
            }
                                                                         ));
        }
Beispiel #4
0
 public void tearDown()
 {
     instance = null;
 }
Beispiel #5
0
 public void setUp()
 {
     instance = new TypeMatcher();
 }