BAEL-2475: Rename tests

This commit is contained in:
Mikhail Chugunov 2019-01-02 19:14:09 +03:00
parent 66016332f8
commit 2e436ce3e8
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import static org.junit.Assert.*;
public class ImmutableObjectDeserializationUnitTest { public class ImmutableObjectDeserializationUnitTest {
@Test @Test
public void testPublicConstructor() throws IOException { public void whenPublicConstructorIsUsed_thenObjectIsDeserialized() throws IOException {
final String json = "{\"name\":\"Frank\",\"age\":50}"; final String json = "{\"name\":\"Frank\",\"age\":50}";
Person person = new ObjectMapper().readValue(json, Person.class); Person person = new ObjectMapper().readValue(json, Person.class);
@ -19,7 +19,7 @@ public class ImmutableObjectDeserializationUnitTest {
} }
@Test @Test
public void testBuilderNullField() throws IOException { public void whenBuilderIsUsedAndFieldIsNull_thenObjectIsDeserialized() throws IOException {
final String json = "{\"name\":\"Frank\",\"age\":50}"; final String json = "{\"name\":\"Frank\",\"age\":50}";
MaritalAwarePerson person = new ObjectMapper().readValue(json, MaritalAwarePerson.class); MaritalAwarePerson person = new ObjectMapper().readValue(json, MaritalAwarePerson.class);
@ -29,7 +29,7 @@ public class ImmutableObjectDeserializationUnitTest {
} }
@Test @Test
public void testBuilderAllFields() throws IOException { public void whenBuilderIsUsedAndAllFieldsPresent_thenObjectIsDeserialized() throws IOException {
final String json = "{\"name\":\"Frank\",\"age\":50,\"married\":true}"; final String json = "{\"name\":\"Frank\",\"age\":50,\"married\":true}";
MaritalAwarePerson person = new ObjectMapper().readValue(json, MaritalAwarePerson.class); MaritalAwarePerson person = new ObjectMapper().readValue(json, MaritalAwarePerson.class);