1
1
/*
2
- * Copyright 2017- 2020 the original author or authors.
2
+ * Copyright 2020 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -38,13 +38,13 @@ final class CircleCodecUnitTests {
38
38
@ Test
39
39
void constructorNoByteBufAllocator () {
40
40
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (null ))
41
- .withMessage ("byteBufAllocator must not be null" );
41
+ .withMessage ("byteBufAllocator must not be null" );
42
42
}
43
43
44
44
@ Test
45
45
void doCanDecodeNoType () {
46
46
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (TEST ).doCanDecode (null , FORMAT_BINARY ))
47
- .withMessage ("type must not be null" );
47
+ .withMessage ("type must not be null" );
48
48
}
49
49
50
50
@ Test
@@ -59,19 +59,19 @@ void doCanDecode() {
59
59
@ Test
60
60
void doDecodeNoByteBuf () {
61
61
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (TEST ).doDecode (null , CIRCLE , FORMAT_BINARY , Circle .class ))
62
- .withMessage ("byteBuf must not be null" );
62
+ .withMessage ("byteBuf must not be null" );
63
63
}
64
64
65
65
@ Test
66
66
void doDecodeNoType () {
67
67
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (TEST ).doDecode (TEST .buffer (), CIRCLE , FORMAT_BINARY , null ))
68
- .withMessage ("type must not be null" );
68
+ .withMessage ("type must not be null" );
69
69
}
70
70
71
71
@ Test
72
72
void doDecodeNoFormat () {
73
73
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (TEST ).doDecode (TEST .buffer (), CIRCLE , null , Circle .class ))
74
- .withMessage ("format must not be null" );
74
+ .withMessage ("format must not be null" );
75
75
}
76
76
77
77
@ Test
@@ -86,7 +86,7 @@ void doDecode() {
86
86
@ Test
87
87
void doEncodeNoValue () {
88
88
assertThatIllegalArgumentException ().isThrownBy (() -> new CircleCodec (TEST ).doEncode (null ))
89
- .withMessage ("value must not be null" );
89
+ .withMessage ("value must not be null" );
90
90
}
91
91
92
92
@ Test
@@ -95,15 +95,15 @@ void doEncode() {
95
95
ByteBuf circleAsBinary = TEST .buffer (codec .lengthInBytes ()).writeDouble (1.12 ).writeDouble (2.12 ).writeDouble (3.12 );
96
96
97
97
ParameterAssert .assertThat (codec .doEncode (new Circle (Point .of (1.12 , 2.12 ), 3.12 )))
98
- .hasFormat (FORMAT_BINARY )
99
- .hasType (CIRCLE .getObjectId ())
100
- .hasValue (circleAsBinary );
98
+ .hasFormat (FORMAT_BINARY )
99
+ .hasType (CIRCLE .getObjectId ())
100
+ .hasValue (circleAsBinary );
101
101
}
102
102
103
103
@ Test
104
104
void encodeNull () {
105
105
ParameterAssert .assertThat (new CircleCodec (TEST ).encodeNull ())
106
- .isEqualTo (new Parameter (FORMAT_BINARY , CIRCLE .getObjectId (), NULL_VALUE ));
106
+ .isEqualTo (new Parameter (FORMAT_BINARY , CIRCLE .getObjectId (), NULL_VALUE ));
107
107
}
108
108
109
109
}
0 commit comments