@@ -72,57 +72,57 @@ public void BeActionResult_GivenUnexpectedType_ShouldFail()
72
72
}
73
73
74
74
[ Fact ]
75
- public void ConvertibleTo_CallingConvertResultsNull_ShouldFail ( )
75
+ public void BeConvertibleTo_CallingConvertResultsNull_ShouldFail ( )
76
76
{
77
77
var mock = new Mock < IConvertToActionResult > ( ) ;
78
78
mock . Setup ( e => e . Convert ( ) ) . Returns ( ( IActionResult ) null ) ;
79
79
var result = mock . Object ;
80
80
var failureMessage = FailureMessageHelper . ExpectedContextToBeConvertible (
81
81
"result" , typeof ( ActionResult ) . FullName , "<null>" ) ;
82
82
83
- Action action = ( ) => result . Should ( ) . ConvertibleTo < ActionResult > ( Reason , ReasonArgs ) ;
83
+ Action action = ( ) => result . Should ( ) . BeConvertibleTo < ActionResult > ( Reason , ReasonArgs ) ;
84
84
85
85
action . Should ( ) . Throw < Exception > ( )
86
86
. WithMessage ( failureMessage ) ;
87
87
88
88
}
89
89
90
90
[ Fact ]
91
- public void ConvertibleTo_CallingConvertResultsDifferentType_ShouldFail ( )
91
+ public void BeConvertibleTo_CallingConvertResultsDifferentType_ShouldFail ( )
92
92
{
93
93
var mock = new Mock < IConvertToActionResult > ( ) ;
94
94
mock . Setup ( e => e . Convert ( ) ) . Returns ( new BadRequestObjectResult ( new object ( ) ) ) ;
95
95
var result = mock . Object ;
96
96
var failureMessage = FailureMessageHelper . ExpectedContextToBeConvertible (
97
97
"result" , typeof ( ActionResult ) . FullName , typeof ( BadRequestObjectResult ) . FullName ) ;
98
98
99
- Action action = ( ) => result . Should ( ) . ConvertibleTo < ActionResult > ( Reason , ReasonArgs ) ;
99
+ Action action = ( ) => result . Should ( ) . BeConvertibleTo < ActionResult > ( Reason , ReasonArgs ) ;
100
100
101
101
action . Should ( ) . Throw < Exception > ( )
102
102
. WithMessage ( failureMessage ) ;
103
103
104
104
}
105
105
106
106
[ Fact ]
107
- public void ConvertibleTo_CallingConvertResultsGoodType_ShouldPass ( )
107
+ public void BeConvertibleTo_CallingConvertResultsGoodType_ShouldPass ( )
108
108
{
109
109
var mock = new Mock < IConvertToActionResult > ( ) ;
110
110
mock . Setup ( e => e . Convert ( ) ) . Returns ( new OkObjectResult ( new object ( ) ) ) ;
111
111
var result = mock . Object ;
112
112
113
- result . Should ( ) . ConvertibleTo < OkObjectResult > ( Reason , ReasonArgs ) ;
113
+ result . Should ( ) . BeConvertibleTo < OkObjectResult > ( Reason , ReasonArgs ) ;
114
114
}
115
115
116
116
[ Fact ]
117
- public void ConvertibleToWich_ShouldBeTheConvertedObject ( )
117
+ public void BeConvertibleTo_ShouldBeTheConvertedObject ( )
118
118
{
119
119
var mock = new Mock < IConvertToActionResult > ( ) ;
120
120
var expectation = new OkObjectResult ( new object ( ) ) ;
121
121
mock . Setup ( e => e . Convert ( ) ) . Returns ( expectation ) ;
122
122
var result = mock . Object ;
123
123
124
124
var actual =
125
- result . Should ( ) . ConvertibleTo < OkObjectResult > ( Reason , ReasonArgs ) . Which ;
125
+ result . Should ( ) . BeConvertibleTo < OkObjectResult > ( Reason , ReasonArgs ) . Which ;
126
126
127
127
actual . Should ( ) . BeSameAs ( expectation ) ;
128
128
}
0 commit comments