@@ -516,133 +516,6 @@ public void ResideInNamespace_Nested_AllClassReturned()
516516 Assert . True ( result . IsSuccessful ) ;
517517 }
518518
519- [ Fact ( DisplayName = "Types can be selected if they have a dependency on a specific item." ) ]
520- public void HaveDependency_MatchesFound_ClassSelected ( )
521- {
522- var result = Types
523- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
524- . That ( )
525- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
526- . And ( )
527- . HaveNameStartingWith ( "HasDepend" )
528- . Should ( )
529- . HaveDependencyOnAny ( typeof ( ExampleDependency ) . FullName )
530- . GetResult ( ) ;
531-
532- Assert . True ( result . IsSuccessful ) ;
533- }
534-
535- [ Fact ( DisplayName = "Types can be selected if they have a dependency on any item in a list." ) ]
536- public void HaveDependencyOnAny_MatchesFound_ClassSelected ( )
537- {
538- var result = Types
539- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
540- . That ( )
541- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
542- . And ( )
543- . HaveNameStartingWith ( "Has" )
544- . Should ( )
545- . HaveDependencyOnAny ( new [ ] { typeof ( ExampleDependency ) . FullName , typeof ( AnotherExampleDependency ) . FullName } )
546- . GetResult ( ) ;
547-
548- Assert . True ( result . IsSuccessful ) ;
549- }
550-
551- [ Fact ( DisplayName = "Types can be selected if they have a dependency on all the items in a list." ) ]
552- public void HaveDependencyOnAll_MatchesFound_ClassSelected ( )
553- {
554- var result = Types
555- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
556- . That ( )
557- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
558- . And ( )
559- . HaveNameStartingWith ( "HasDependencies" )
560- . Should ( )
561- . HaveDependencyOnAll ( new [ ] { typeof ( ExampleDependency ) . FullName , typeof ( AnotherExampleDependency ) . FullName } )
562- . GetResult ( ) ;
563-
564- Assert . True ( result . IsSuccessful ) ;
565- }
566-
567- [ Fact ( DisplayName = "Types can be selected if they only have a dependency on any item in a list." ) ]
568- public void OnlyHaveDependenciesOn_MatchesFound_ClassSelected ( )
569- {
570- var result = Types
571- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
572- . That ( )
573- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
574- . And ( )
575- . HaveNameStartingWith ( "HasDependency" )
576- . Should ( )
577- . OnlyHaveDependencyOn ( new [ ] { typeof ( ExampleDependency ) . FullName , "System" } )
578- . GetResult ( ) ;
579-
580- Assert . True ( result . IsSuccessful ) ;
581- }
582-
583- [ Fact ( DisplayName = "Types can be selected if they do not have a dependency on another type." ) ]
584- public void NotHaveDependency_MatchesFound_ClassSelected ( )
585- {
586- var result = Types
587- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
588- . That ( )
589- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
590- . And ( )
591- . HaveNameStartingWith ( "NoDependency" )
592- . Should ( )
593- . NotHaveDependencyOnAny ( typeof ( ExampleDependency ) . FullName )
594- . GetResult ( ) ;
595-
596- Assert . True ( result . IsSuccessful ) ;
597- }
598-
599- [ Fact ( DisplayName = "Types can be selected if they do not have a dependency on any item in a list." ) ]
600- public void NotHaveDependencyOnAny_MatchesFound_ClassSelected ( )
601- {
602- var result = Types
603- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
604- . That ( )
605- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
606- . And ( )
607- . HaveNameStartingWith ( "NoDependency" )
608- . Should ( )
609- . NotHaveDependencyOnAny ( new [ ] { typeof ( ExampleDependency ) . FullName , typeof ( AnotherExampleDependency ) . FullName } )
610- . GetResult ( ) ;
611-
612- Assert . True ( result . IsSuccessful ) ;
613- }
614-
615- [ Fact ( DisplayName = "Types can be selected if they do not have a dependency on all the items in a list." ) ]
616- public void NotHaveDependencyOnAll_MatchesFound_ClassSelected ( )
617- {
618- var result = Types
619- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
620- . That ( )
621- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
622- . And ( )
623- . HaveNameStartingWith ( "NoDependency" )
624- . Should ( )
625- . NotHaveDependencyOnAll ( new [ ] { typeof ( ExampleDependency ) . FullName , typeof ( AnotherExampleDependency ) . FullName } )
626- . GetResult ( ) ;
627-
628- Assert . True ( result . IsSuccessful ) ;
629- }
630-
631- [ Fact ( DisplayName = "Types can be selected if they have a dependency that is not on the a list." ) ]
632- public void HaveDependenciesOtherThan_MatchesFound_ClassSelected ( )
633- {
634- var result = Types
635- . InAssembly ( Assembly . GetAssembly ( typeof ( ClassA1 ) ) )
636- . That ( )
637- . ResideInNamespace ( typeof ( HasDependency ) . Namespace )
638- . And ( )
639- . HaveNameStartingWith ( "HasDependencies" )
640- . Should ( )
641- . HaveDependencyOtherThan ( new [ ] { typeof ( ExampleDependency ) . FullName , "System" } )
642- . GetResult ( ) ;
643-
644- Assert . True ( result . IsSuccessful ) ;
645- }
646519
647520 [ Fact ( DisplayName = "Types failing condition are reported when test fails." ) ]
648521 public void MatchNotFound_ClassesReported ( )
0 commit comments