You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/MyTested.AspNetCore.Mvc.Controllers.Attributes.Test/BuildersTests/AttributesTests/ActionAttributesTestBuilderTests.cs
+24-24Lines changed: 24 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
usingSystem.Collections.Generic;
4
4
usingExceptions;
5
5
usingMicrosoft.AspNetCore.Mvc;
6
-
usingSetups.Pipelines;
7
6
usingSetups;
8
7
usingSetups.Controllers;
9
8
usingSetups.Models;
10
9
usingSetups.ActionFilters;
10
+
usingSetups.Pipeline;
11
11
usingXunit;
12
12
13
13
usingHttpMethod=System.Net.Http.HttpMethod;
@@ -559,7 +559,7 @@ public void SpecifyingMiddlewareShouldNotThrowExceptionWithCorrectAttribute()
559
559
.Calling(c =>c.VariousAttributesAction())
560
560
.ShouldHave()
561
561
.ActionAttributes(attributes =>attributes
562
-
.SpecifyingMiddleware(typeof(MyPipeline)));
562
+
.SpecifyingMiddleware(typeof(Pipeline)));
563
563
}
564
564
565
565
[Fact]
@@ -573,7 +573,7 @@ public void SpecifyingMiddlewareShouldThrowExceptionWithMissingAttribute()
573
573
.Calling(c =>c.NormalActionWithAttributes())
574
574
.ShouldHave()
575
575
.ActionAttributes(attributes =>attributes
576
-
.SpecifyingMiddleware(typeof(MyPipeline)));
576
+
.SpecifyingMiddleware(typeof(Pipeline)));
577
577
},
578
578
"When calling NormalActionWithAttributes action in MvcController expected action to have MiddlewareFilterAttribute, but in fact such was not found.");
579
579
}
@@ -589,7 +589,7 @@ public void SpecifyingMiddlewareShouldThrowExceptionWithCorrectAttributeAndWrong
589
589
.Calling(c =>c.VariousAttributesAction())
590
590
.ShouldHave()
591
591
.ActionAttributes(attributes =>attributes
592
-
.SpecifyingMiddleware(typeof(MyOtherPipeline)));
592
+
.SpecifyingMiddleware(typeof(OtherPipeline)));
593
593
},
594
594
"When calling VariousAttributesAction action in MvcController expected action to have MiddlewareFilterAttribute with 'MyOtherPipeline' type, but in fact found 'MyPipeline'.");
595
595
}
@@ -603,7 +603,7 @@ public void SpecifyingMiddlewareShouldNotThrowExceptionWithCorrectAttributeConfi
603
603
.ShouldHave()
604
604
.ActionAttributes(attributes =>attributes
605
605
.SpecifyingMiddleware(middleware =>middleware
606
-
.OfType(typeof(MyPipeline))));
606
+
.OfType(typeof(Pipeline))));
607
607
}
608
608
609
609
[Fact]
@@ -618,7 +618,7 @@ public void SpecifyingMiddlewareShouldThrowExceptionWithWrongConfigurationType()
618
618
.ShouldHave()
619
619
.ActionAttributes(attributes =>attributes
620
620
.SpecifyingMiddleware(middleware =>middleware
621
-
.OfType(typeof(MyOtherPipeline))));
621
+
.OfType(typeof(OtherPipeline))));
622
622
},
623
623
"When calling VariousAttributesAction action in MvcController expected action to have MiddlewareFilterAttribute with 'MyOtherPipeline' type, but in fact found 'MyPipeline'.");
624
624
}
@@ -659,7 +659,7 @@ public void SpecifyingMiddlewareShouldNotThrowExceptionWithCorrectAttributeConfi
659
659
.ShouldHave()
660
660
.ActionAttributes(attributes =>attributes
661
661
.SpecifyingMiddleware(middleware =>middleware
662
-
.OfType(typeof(MyPipeline))
662
+
.OfType(typeof(Pipeline))
663
663
.AndAlso()
664
664
.WithOrder(2)));
665
665
}
@@ -676,7 +676,7 @@ public void SpecifyingMiddlewareShouldThrowExceptionWithCorrectAttributeConfigTy
676
676
.ShouldHave()
677
677
.ActionAttributes(attributes =>attributes
678
678
.SpecifyingMiddleware(middleware =>middleware
679
-
.OfType(typeof(MyPipeline))
679
+
.OfType(typeof(Pipeline))
680
680
.AndAlso()
681
681
.WithOrder(1)));
682
682
},
@@ -693,7 +693,7 @@ public void WithTypeFilterShouldNotThrowExceptionWithCorrectAttribute()
"When calling VariousAttributesAction action in MvcController expected action to have TypeFilterAttribute with 'MyOtherActionFilterWithArgs' type, but in fact found 'MyActionFilterWithArgs'.");
737
737
@@ -749,7 +749,7 @@ public void WithTypeFilterShouldNotThrowExceptionWithCorrectImplementationType()
749
749
.ShouldHave()
750
750
.ActionAttributes(attributes =>attributes
751
751
.WithTypeFilter(filter =>filter
752
-
.OfType(typeof(MyActionFilterWithArgs))));
752
+
.OfType(typeof(CustomActionFilterWithArgs))));
753
753
754
754
MyApplication.StartsFrom<DefaultStartup>();
755
755
}
@@ -768,7 +768,7 @@ public void WithTypeFilterShouldThrowExceptionWithWrongImplementationType()
768
768
.ShouldHave()
769
769
.ActionAttributes(attributes =>attributes
770
770
.WithTypeFilter(filter =>filter
771
-
.OfType(typeof(MyOtherActionFilterWithArgs))));
771
+
.OfType(typeof(OtherActionFilterWithArgs))));
772
772
},
773
773
"When calling VariousAttributesAction action in MvcController expected action to have TypeFilterAttribute with 'MyOtherActionFilterWithArgs' type, but in fact found 'MyActionFilterWithArgs'.");
774
774
@@ -821,7 +821,7 @@ public void WithTypeFilterShouldNotThrowExceptionWithCorrectAttributeImplementat
821
821
.ShouldHave()
822
822
.ActionAttributes(attributes =>attributes
823
823
.WithTypeFilter(filter =>filter
824
-
.OfType(typeof(MyActionFilterWithArgs))
824
+
.OfType(typeof(CustomActionFilterWithArgs))
825
825
.AndAlso()
826
826
.WithOrder(2)));
827
827
@@ -842,7 +842,7 @@ public void WithTypeFilterShouldThrowExceptionWithCorrectAttributeImplementation
842
842
.ShouldHave()
843
843
.ActionAttributes(attributes =>attributes
844
844
.WithTypeFilter(filter =>filter
845
-
.OfType(typeof(MyActionFilterWithArgs))
845
+
.OfType(typeof(CustomActionFilterWithArgs))
846
846
.AndAlso()
847
847
.WithOrder(1)));
848
848
},
@@ -862,7 +862,7 @@ public void WithTypeFilterShouldNotThrowExceptionWithCorrectAttributeImplementat
862
862
.ShouldHave()
863
863
.ActionAttributes(attributes =>attributes
864
864
.WithTypeFilter(filter =>filter
865
-
.OfType(typeof(MyActionFilterWithArgs))
865
+
.OfType(typeof(CustomActionFilterWithArgs))
866
866
.AndAlso()
867
867
.WithArguments(newobject[]
868
868
{
@@ -886,7 +886,7 @@ public void WithTypeFilterShouldThrowExceptionWithCorrectAttributeImplementation
886
886
.ShouldHave()
887
887
.ActionAttributes(attributes =>attributes
888
888
.WithTypeFilter(filter =>filter
889
-
.OfType(typeof(MyActionFilterWithArgs))
889
+
.OfType(typeof(CustomActionFilterWithArgs))
890
890
.AndAlso()
891
891
.WithArguments(newobject[]
892
892
{
@@ -949,7 +949,7 @@ public void WithServiceFilterShouldNotThrowExceptionWithCorrectAttribute()
949
949
.Calling(c =>c.VariousAttributesAction())
950
950
.ShouldHave()
951
951
.ActionAttributes(attributes =>attributes
952
-
.WithServiceFilter(typeof(MyActionFilter)));
952
+
.WithServiceFilter(typeof(CustomActionFilter)));
953
953
954
954
MyApplication.StartsFrom<DefaultStartup>();
955
955
}
@@ -967,7 +967,7 @@ public void WithServiceFilterShouldThrowExceptionWithMissingAttribute()
967
967
.Calling(c =>c.NormalActionWithAttributes())
968
968
.ShouldHave()
969
969
.ActionAttributes(attributes =>attributes
970
-
.WithServiceFilter(typeof(MyActionFilter)));
970
+
.WithServiceFilter(typeof(CustomActionFilter)));
971
971
},
972
972
"When calling NormalActionWithAttributes action in MvcController expected action to have ServiceFilterAttribute, but in fact such was not found.");
973
973
@@ -987,7 +987,7 @@ public void WithServiceFilterShouldThrowExceptionWithCorrectAttributeAndWrongCon
987
987
.Calling(c =>c.VariousAttributesAction())
988
988
.ShouldHave()
989
989
.ActionAttributes(attributes =>attributes
990
-
.WithServiceFilter(typeof(MyOtherActionFilter)));
990
+
.WithServiceFilter(typeof(OtherActionFilter)));
991
991
},
992
992
"When calling VariousAttributesAction action in MvcController expected action to have ServiceFilterAttribute with 'MyOtherActionFilter' type, but in fact found 'MyActionFilter'.");
993
993
@@ -1005,7 +1005,7 @@ public void WithServiceFilterShouldNotThrowExceptionWithCorrectServiceFilterType
1005
1005
.ShouldHave()
1006
1006
.ActionAttributes(attributes =>attributes
1007
1007
.WithServiceFilter(filter =>filter
1008
-
.OfType(typeof(MyActionFilter))));
1008
+
.OfType(typeof(CustomActionFilter))));
1009
1009
1010
1010
MyApplication.StartsFrom<DefaultStartup>();
1011
1011
}
@@ -1024,7 +1024,7 @@ public void WithServiceFilterShouldThrowExceptionWithWrongServiceFilterType()
1024
1024
.ShouldHave()
1025
1025
.ActionAttributes(attributes =>attributes
1026
1026
.WithServiceFilter(filter =>filter
1027
-
.OfType(typeof(MyOtherActionFilter))));
1027
+
.OfType(typeof(OtherActionFilter))));
1028
1028
},
1029
1029
"When calling VariousAttributesAction action in MvcController expected action to have ServiceFilterAttribute with 'MyOtherActionFilter' type, but in fact found 'MyActionFilter'.");
1030
1030
@@ -1077,7 +1077,7 @@ public void WithServiceFilterShouldNotThrowExceptionWithCorrectAttributeServiceT
1077
1077
.ShouldHave()
1078
1078
.ActionAttributes(attributes =>attributes
1079
1079
.WithServiceFilter(filter =>filter
1080
-
.OfType(typeof(MyActionFilter))
1080
+
.OfType(typeof(CustomActionFilter))
1081
1081
.AndAlso()
1082
1082
.WithOrder(2)));
1083
1083
@@ -1098,7 +1098,7 @@ public void WithServiceFilterShouldThrowExceptionWithCorrectAttributeServiceType
0 commit comments