for now, make give all users the role of a HOSTMASTER
This commit is contained in:
@ -21,7 +21,7 @@ public class JSonBuilder {
|
||||
}
|
||||
|
||||
private static String inQuotes(Object value) {
|
||||
return "\"" + value.toString() + "\"";
|
||||
return value != null ? "\"" + value.toString() + "\"" : "null";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -72,6 +72,20 @@ public class JSonDeserializerWithAccessFilterUnitTest {
|
||||
given(jsonParser.getCodec()).willReturn(codec);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldDeserializeNullField() throws IOException {
|
||||
// given
|
||||
givenJSonTree(asJSon(
|
||||
ImmutablePair.of("id", 1234L),
|
||||
ImmutablePair.of("openStringField", null)));
|
||||
|
||||
// when
|
||||
GivenDto actualDto = new JSonDeserializerWithAccessFilter<>(ctx, jsonParser, null, GivenDto.class).deserialize();
|
||||
|
||||
// then
|
||||
assertThat(actualDto.openStringField).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldDeserializeStringField() throws IOException {
|
||||
// given
|
||||
|
Reference in New Issue
Block a user