@@ -393,34 +393,34 @@ protected override DomainConfiguration BuildConfiguration()
393393 private static void VerifyModel ( Domain domain )
394394 {
395395 TypeInfoCollection types = domain . Model . Types ;
396- Assert . AreEqual ( types . FindAncestor ( types [ typeof ( Person ) ] ) , null ) ;
397- Assert . AreEqual ( types . FindAncestor ( types [ typeof ( Book ) ] ) , null ) ;
398- Assert . AreEqual ( types . FindAncestor ( types [ typeof ( BookReview ) ] ) , null ) ;
399- Assert . AreEqual ( types . FindAncestor ( types [ typeof ( Author ) ] ) , types [ typeof ( Person ) ] ) ;
400-
401- Assert . AreEqual ( types [ typeof ( Person ) ] . GetAncestor ( ) , null ) ;
402- Assert . AreEqual ( types [ typeof ( Book ) ] . GetAncestor ( ) , null ) ;
403- Assert . AreEqual ( types [ typeof ( BookReview ) ] . GetAncestor ( ) , null ) ;
404- Assert . AreEqual ( types [ typeof ( Author ) ] . GetAncestor ( ) , types [ typeof ( Person ) ] ) ;
405-
406- ICollection < TypeInfo > collection = types . Structures ;
407- Assert . IsTrue ( collection . Count > 0 ) ;
396+ Assert . AreEqual ( types [ typeof ( Person ) ] . Ancestor , null ) ;
397+ Assert . AreEqual ( types [ typeof ( Book ) ] . Ancestor , null ) ;
398+ Assert . AreEqual ( types [ typeof ( BookReview ) ] . Ancestor , null ) ;
399+ Assert . AreEqual ( types [ typeof ( Author ) ] . Ancestor , types [ typeof ( Person ) ] ) ;
400+
401+ Assert . AreEqual ( types [ typeof ( Person ) ] . Ancestor , null ) ;
402+ Assert . AreEqual ( types [ typeof ( Book ) ] . Ancestor , null ) ;
403+ Assert . AreEqual ( types [ typeof ( BookReview ) ] . Ancestor , null ) ;
404+ Assert . AreEqual ( types [ typeof ( Author ) ] . Ancestor , types [ typeof ( Person ) ] ) ;
405+
406+ var collection = types . Structures ;
407+ Assert . IsTrue ( collection . Any ( ) ) ;
408408 foreach ( TypeInfo item in collection ) {
409409 Assert . IsTrue ( item . IsStructure ) ;
410410 Assert . IsFalse ( item . IsInterface ) ;
411411 Assert . IsFalse ( item . IsEntity ) ;
412412 }
413413
414414 collection = types . Interfaces ;
415- Assert . IsFalse ( collection . Count > 0 ) ;
415+ Assert . IsFalse ( collection . Any ( ) ) ;
416416 foreach ( TypeInfo item in collection ) {
417417 Assert . IsTrue ( item . IsInterface ) ;
418418 Assert . IsFalse ( item . IsStructure ) ;
419419 Assert . IsFalse ( item . IsEntity ) ;
420420 }
421421
422422 collection = types . Entities ;
423- Assert . IsTrue ( collection . Count > 0 ) ;
423+ Assert . IsTrue ( collection . Any ( ) ) ;
424424 foreach ( TypeInfo item in collection ) {
425425 Assert . IsTrue ( item . IsEntity ) ;
426426 Assert . IsFalse ( item . IsInterface ) ;
@@ -555,8 +555,8 @@ private static void VerifyModel(Domain domain)
555555 Assert . AreEqual ( true , typeInfo . Fields [ "Books" ] . IsNullable ) ;
556556 Assert . AreEqual ( "Books" , typeInfo . Fields [ "Books" ] . Name ) ;
557557
558- Assert . AreEqual ( 2 , typeInfo . Fields . Find ( FieldAttributes . Declared ) . Count ) ;
559- Assert . AreEqual ( 9 , typeInfo . Fields . Find ( FieldAttributes . Inherited ) . Count ) ;
558+ Assert . AreEqual ( 2 , typeInfo . Fields . Find ( FieldAttributes . Declared ) . Count ( ) ) ;
559+ Assert . AreEqual ( 9 , typeInfo . Fields . Find ( FieldAttributes . Inherited ) . Count ( ) ) ;
560560
561561 // KeyColumns
562562 Assert . IsNotNull ( typeInfo . Columns [ "PassportNumber" ] ) ;
0 commit comments