Example #1
0
 public static bool IsBasedOn <TParent>(this Type sourceType)
 {
     return(TypeReflections.IsTypeBasedOn(sourceType, typeof(TParent)));
 }
Example #2
0
 public void TypeBasedOnTypeWithEntryThreeAndBaseThreeWithLongTest()
 {
     TypeReflections.IsTypeBasedOn(Entry3, typeof(BaseLevelThree <long>)).ShouldBeTrue();
 }
Example #3
0
 public static bool IsBasedOn(this Type sourceType, Type parentType)
 {
     return(TypeReflections.IsTypeBasedOn(sourceType, parentType));
 }
Example #4
0
 public void TypeBasedOnTypeWithEntryTwoAndInterfaceOneTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(IInterfaceOne)).ShouldBeTrue();
 }
Example #5
0
 public void TypeBasedOnTypeWithEntryTwoAndBaseTwoTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(BaseLevelTwo)).ShouldBeTrue();
 }
Example #6
0
 public void TypeBasedOnTypeWithEntryTwoAndInterfaceThreeDefinitionTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(IInterfaceThree <>)).ShouldBeTrue();
 }
Example #7
0
 public void TypeBasedOnTypeWithEntryTwoAndInterfaceThreeWithStringTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(IInterfaceThree <string>)).ShouldBeFalse();
 }
Example #8
0
 public void TypeBasedOnTypeWithEntryTwoAndInterfaceFourWithStringAndIntTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(IInterfaceFour <string, int>)).ShouldBeFalse();
 }
Example #9
0
 public void TypeBasedOnTypeWithEntryTwoAndInterfaceFourWithIntAndStringTest()
 {
     TypeReflections.IsTypeBasedOn(Entry2, typeof(IInterfaceFour <int, string>)).ShouldBeTrue();
 }
Example #10
0
 public void TypeBasedOnTypeWithEntryOneAndAbstractOneTest()
 {
     TypeReflections.IsTypeBasedOn(Entry1, typeof(AbstractLevelOne)).ShouldBeTrue();
 }