public void ObjectDerivedFromTypeWithEntryOneAndAbstractOneTest() { var model1 = new EntryClassOne(); TypeReflections.IsObjectDerivedFrom(model1, typeof(AbstractLevelOne)).ShouldBeTrue(); TypeReflections.IsObjectDerivedFrom(model1, typeof(AbstractLevelOne)).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithAbstractOneAndInterfaceZeroTest() { var model1 = new EntryClassOne(); var model2 = (AbstractLevelOne)model1; TypeReflections.IsObjectDerivedFrom(model2, typeof(AbstractLevelOne)).ShouldBeFalse(); TypeReflections.IsObjectDerivedFrom(model2, typeof(AbstractLevelOne), derivedOptions: TypeDerivedOptions.CanAbstract).ShouldBeTrue(); TypeReflections.IsObjectDerivedFrom(model2, typeof(IInterfaceZero)).ShouldBeFalse(); TypeReflections.IsObjectDerivedFrom(model2, typeof(IInterfaceZero), derivedOptions: TypeDerivedOptions.CanAbstract).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithEntryTwoAndInterfaceThreeWithIntTest() { var model1 = new EntryClassTwo(); TypeReflections.IsObjectDerivedFrom(model1, typeof(IInterfaceThree <int>)).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithEntryTwoAndInterfaceFourDefinitionTest() { var model1 = new EntryClassTwo(); TypeReflections.IsObjectDerivedFrom(model1, typeof(IInterfaceFour <,>)).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithEntryTwoAndInterfaceFourWithStringAndIntTest() { var model1 = new EntryClassTwo(); TypeReflections.IsObjectDerivedFrom(model1, typeof(IInterfaceFour <string, int>)).ShouldBeFalse(); }
public void ObjectDerivedFromTypeWithEntryTwoAndInterfaceFourWithIntAndStringTest() { var model1 = new EntryClassTwo(); TypeReflections.IsObjectDerivedFrom(model1, typeof(IInterfaceFour <int, string>)).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithEntryThreeAndBaseThreeWithLongTest() { var model1 = new EntryClassThree(); TypeReflections.IsObjectDerivedFrom(model1, typeof(BaseLevelThree <long>)).ShouldBeTrue(); }
public void ObjectDerivedFromTypeWithEntryTwoAndBaseTwoTest() { var model1 = new EntryClassTwo(); TypeReflections.IsObjectDerivedFrom(model1, typeof(BaseLevelTwo)).ShouldBeTrue(); }