Inheritance: Animal
示例#1
0
 public void CastingToAModulesBaseClassWillResolveAndCastThatModule()
 {
     var outer = new Cat();
     dynamic value = new DelegatingObject( DateTime.Now, outer, 10 );
     Animal animal = value;
     Assert.AreSame( outer, animal );
 }
示例#2
0
 public void CastingToABaseClassWithADelegatingObjectInTheModuleChainCastsSuccessfully()
 {
     var outer = new Cat();
     dynamic value = new DelegatingObject( outer, new DelegatingObject() );
     Animal animal = value;
     Assert.AreSame( outer, animal );
 }
 public CheshireCat( Cat cat = null )
     : base(cat)
 {
 }