Update PersonSerializerUnitTest.java (#14441)
This commit is contained in:
parent
6f78670338
commit
508a5e414b
|
@ -33,7 +33,7 @@ public class PersonSerializerUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void WhenUseCustomGson_ThenDonotSerializeAccountNumAndPassword () {
|
public void whenUseCustomGson_thenDonotSerializeAccountNumAndPassword () {
|
||||||
|
|
||||||
String personJson = PersonSerializer.serializeWithConfiguredGson(person);
|
String personJson = PersonSerializer.serializeWithConfiguredGson(person);
|
||||||
logger.info(personJson);
|
logger.info(personJson);
|
||||||
|
@ -42,7 +42,7 @@ public class PersonSerializerUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void WhenUseDefaultGson_ThenSerializeAccountNumAndPassword () {
|
public void whenUseDefaultGson_thenSerializeAccountNumAndPassword () {
|
||||||
|
|
||||||
String personJson = PersonSerializer.serializeWithDefaultGson(person);
|
String personJson = PersonSerializer.serializeWithDefaultGson(person);
|
||||||
logger.info(personJson);
|
logger.info(personJson);
|
||||||
|
@ -51,7 +51,7 @@ public class PersonSerializerUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenUseSerializedAnnotation_ThenUseSerializedNameinJsonString() {
|
public void whenUseSerializedAnnotation_thenUseSerializedNameinJsonString() {
|
||||||
String countryJson = PersonSerializer.toJsonString(country);
|
String countryJson = PersonSerializer.toJsonString(country);
|
||||||
logger.info(countryJson);
|
logger.info(countryJson);
|
||||||
assertFalse("Test failed: No change in the keys", countryJson.contains("countryName"));
|
assertFalse("Test failed: No change in the keys", countryJson.contains("countryName"));
|
||||||
|
@ -64,7 +64,7 @@ public class PersonSerializerUnitTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenJsonStrCreatedWithCustomKeys_ThenCreateObjUsingGson() {
|
public void whenJsonStrCreatedWithCustomKeys_thenCreateObjUsingGson() {
|
||||||
String countryJson = PersonSerializer.toJsonString(country);
|
String countryJson = PersonSerializer.toJsonString(country);
|
||||||
Country country = PersonSerializer.fromJsonString(countryJson);
|
Country country = PersonSerializer.fromJsonString(countryJson);
|
||||||
logger.info(country.toString());
|
logger.info(country.toString());
|
||||||
|
|
Loading…
Reference in New Issue