File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
main/java/org/everit/json/schema
test/java/org/everit/json/schema Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .everit .json .schema ;
17
17
18
+ import org .everit .json .schema .internal .JSONPrinter ;
19
+
18
20
import java .util .Objects ;
19
21
20
22
/**
@@ -86,4 +88,10 @@ public int hashCode() {
86
88
protected boolean canEqual (Object other ) {
87
89
return other instanceof NotSchema ;
88
90
}
91
+
92
+ @ Override
93
+ void describePropertiesTo (JSONPrinter writer ) {
94
+ writer .key ("not" );
95
+ mustNotMatch .describeTo (writer );
96
+ }
89
97
}
Original file line number Diff line number Diff line change 20
20
import static org .junit .Assert .assertEquals ;
21
21
import org .junit .Test ;
22
22
23
- public class
24
- NotSchemaTest {
23
+ public class NotSchemaTest {
25
24
26
25
@ Test
27
26
public void failure () {
@@ -45,4 +44,13 @@ public void equalsVerifier() {
45
44
.verify ();
46
45
}
47
46
47
+ @ Test
48
+ public void toStringTest () {
49
+ NotSchema subject = NotSchema .builder ()
50
+ .mustNotMatch (BooleanSchema .INSTANCE )
51
+ .build ();
52
+ String actual = subject .toString ();
53
+ assertEquals ("{\" not\" :{\" type\" :\" boolean\" }}" , actual );
54
+ }
55
+
48
56
}
You can’t perform that action at this time.
0 commit comments