Example #1
0
        public void TypesThat_AreBasedOn_Func()
        {
            var testFunc = (Func <Type, bool>)TypesThat.AreBasedOn(type => type == typeof(IBasicService));

            Assert.True(testFunc(typeof(BasicService)));
            Assert.False(testFunc(typeof(MultipleService1)));
        }
Example #2
0
 public void TypesThat_AreBasedOn_Func_Throws_Null()
 {
     Assert.Throws <ArgumentNullException>(() => TypesThat.AreBasedOn((Func <Type, bool>)null));
 }
Example #3
0
 public void TypesThat_AreBasedOn_Throws_Null()
 {
     Assert.Throws <ArgumentNullException>(() => TypesThat.AreBasedOn((Type)null));
 }