File tree Expand file tree Collapse file tree 3 files changed +29
-12
lines changed
src/main/java/net/codestory/rest Expand file tree Collapse file tree 3 files changed +29
-12
lines changed Original file line number Diff line number Diff line change 19
19
20
20
import static java .lang .String .format ;
21
21
22
- class RestResponseShould implements Should {
22
+ class RestResponseShould implements ShouldChain {
23
23
private final RestResponse response ;
24
24
private final boolean negate ;
25
25
@@ -37,7 +37,6 @@ public RestResponseShould not() {
37
37
38
38
// Verifications
39
39
40
- // TODO: shouldn't be able to write should().should()
41
40
@ Override
42
41
public RestResponseShould should () {
43
42
return new RestResponseShould (response , false );
Original file line number Diff line number Diff line change 16
16
package net .codestory .rest ;
17
17
18
18
public interface Should {
19
- Should should ();
20
-
21
19
Should not ();
22
20
23
- Should respond (int statusCode );
21
+ ShouldChain respond (int statusCode );
24
22
25
- Should succeed ();
23
+ ShouldChain succeed ();
26
24
27
- Should fail ();
25
+ ShouldChain fail ();
28
26
29
- Should contain (String content );
27
+ ShouldChain contain (String content );
30
28
31
- Should beEmpty ();
29
+ ShouldChain beEmpty ();
32
30
33
- Should haveType (String contentType );
31
+ ShouldChain haveType (String contentType );
34
32
35
- Should haveCookie (String name , String value );
33
+ ShouldChain haveCookie (String name , String value );
36
34
37
- Should haveHeader (String name , String value );
35
+ ShouldChain haveHeader (String name , String value );
38
36
}
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (C) 2013-2014 [email protected]
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License
15
+ */
16
+ package net .codestory .rest ;
17
+
18
+ public interface ShouldChain extends Should {
19
+ ShouldChain should ();
20
+ }
You can’t perform that action at this time.
0 commit comments