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(); }