@@ -392,8 +392,9 @@ public void AreClasses_MatchesFound_ClassesSelected()
392392 . And ( )
393393 . AreClasses ( ) . GetTypes ( ) ;
394394
395- Assert . Single ( result ) ; // One type found
395+ Assert . Equal ( 2 , result . Count ( ) ) ; // Two types found
396396 Assert . Contains < Type > ( typeof ( ExampleClass ) , result ) ;
397+ Assert . Contains < Type > ( typeof ( ExampleStaticClass ) , result ) ;
397398 }
398399
399400 [ Fact ( DisplayName = "Types can be selected if they are not classes." ) ]
@@ -462,8 +463,38 @@ public void AreNotInterfaces_MatchesFound_ClassesSelected ()
462463 . And ( )
463464 . AreNotInterfaces ( ) . GetTypes ( ) ;
464465
465- Assert . Single ( result ) ; // One type found
466+ Assert . Equal ( 2 , result . Count ( ) ) ; // Two types found
467+ Assert . Contains < Type > ( typeof ( ExampleClass ) , result ) ;
468+ Assert . Contains < Type > ( typeof ( ExampleStaticClass ) , result ) ;
469+ }
470+
471+ [ Fact ( DisplayName = "Types can be selected if they are static." ) ]
472+ public void AreStatic_MatchesFound_ClassesSelected ( )
473+ {
474+ var result = Types
475+ . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
476+ . That ( )
477+ . ResideInNamespace ( "NetArchTest.TestStructure.Classes" )
478+ . And ( )
479+ . AreStatic ( ) . GetTypes ( ) ;
480+
481+ Assert . Single ( result ) ; // One type found
482+ Assert . Contains < Type > ( typeof ( ExampleStaticClass ) , result ) ;
483+ }
484+
485+ [ Fact ( DisplayName = "Types can be selected if they are not static." ) ]
486+ public void AreNotStatic_MatchesFound_ClassesSelected ( )
487+ {
488+ var result = Types
489+ . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
490+ . That ( )
491+ . ResideInNamespace ( "NetArchTest.TestStructure.Classes" )
492+ . And ( )
493+ . AreNotStatic ( ) . GetTypes ( ) ;
494+
495+ Assert . Equal ( 2 , result . Count ( ) ) ; // Two types found
466496 Assert . Contains < Type > ( typeof ( ExampleClass ) , result ) ;
497+ Assert . Contains < Type > ( typeof ( IExampleInterface ) , result ) ;
467498 }
468499
469500 [ Fact ( DisplayName = "Types can be selected if they are nested." ) ]
0 commit comments