File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1616
1717namespace MyWebApi . Tests
1818{
19+ using System . Web . Http ;
1920 using Exceptions ;
2021 using NUnit . Framework ;
2122 using Setups . Controllers ;
@@ -24,6 +25,22 @@ namespace MyWebApi.Tests
2425 [ TestFixture ]
2526 public class MyWebApiTests
2627 {
28+ [ Test ]
29+ public void IsUsingShouldOverrideTheDefaultConfiguration ( )
30+ {
31+ var config = new HttpConfiguration ( ) ;
32+ MyWebApi . IsUsing ( config ) ;
33+
34+ // run two test cases in order to check the configuration is global
35+ for ( int i = 0 ; i < 2 ; i ++ )
36+ {
37+ var controller = MyWebApi . Controller < WebApiController > ( ) . Controller ;
38+ var actualConfig = controller . Configuration ;
39+
40+ Assert . AreSame ( config , actualConfig ) ;
41+ }
42+ }
43+
2744 [ Test ]
2845 public void ControllerWithoutConstructorFunctionShouldPopulateCorrectNewInstanceOfControllerType ( )
2946 {
You can’t perform that action at this time.
0 commit comments