Search in sources :

Example 1 with BuildVersion

use of de.codecentric.boot.admin.server.domain.values.BuildVersion in project spring-boot-admin by codecentric.

the class BuildVersionMixinTest method verifyDeserialize.

@Test
public void verifyDeserialize() throws JSONException, JsonProcessingException {
    BuildVersion buildVersion = objectMapper.readValue("\"1.0.0\"", BuildVersion.class);
    assertThat(buildVersion).isEqualTo(BuildVersion.valueOf("1.0.0"));
}
Also used : BuildVersion(de.codecentric.boot.admin.server.domain.values.BuildVersion) Test(org.junit.jupiter.api.Test)

Example 2 with BuildVersion

use of de.codecentric.boot.admin.server.domain.values.BuildVersion in project spring-boot-admin by codecentric.

the class BuildVersionMixinTest method verifySerialize.

@Test
public void verifySerialize() throws JsonProcessingException {
    BuildVersion buildVersion = BuildVersion.valueOf("1.0.0");
    String result = objectMapper.writeValueAsString(buildVersion);
    assertThat(result).isEqualTo("\"1.0.0\"");
}
Also used : BuildVersion(de.codecentric.boot.admin.server.domain.values.BuildVersion) Test(org.junit.jupiter.api.Test)

Example 3 with BuildVersion

use of de.codecentric.boot.admin.server.domain.values.BuildVersion in project spring-boot-admin by codecentric.

the class BuildVersionMixinTest method verifySerializeWithMapEntryVersion.

@Test
public void verifySerializeWithMapEntryVersion() throws JsonProcessingException {
    BuildVersion buildVersion = BuildVersion.from(singletonMap("version", "1.0.0"));
    String result = objectMapper.writeValueAsString(buildVersion);
    assertThat(result).isEqualTo("\"1.0.0\"");
}
Also used : BuildVersion(de.codecentric.boot.admin.server.domain.values.BuildVersion) Test(org.junit.jupiter.api.Test)

Example 4 with BuildVersion

use of de.codecentric.boot.admin.server.domain.values.BuildVersion in project spring-boot-admin by codecentric.

the class BuildVersionMixinTest method verifySerializeWithNestedMapEntryVersion.

@Test
public void verifySerializeWithNestedMapEntryVersion() throws JsonProcessingException {
    BuildVersion buildVersion = BuildVersion.from(singletonMap("build", singletonMap("version", "1.0.0")));
    String result = objectMapper.writeValueAsString(buildVersion);
    assertThat(result).isEqualTo("\"1.0.0\"");
}
Also used : BuildVersion(de.codecentric.boot.admin.server.domain.values.BuildVersion) Test(org.junit.jupiter.api.Test)

Aggregations

BuildVersion (de.codecentric.boot.admin.server.domain.values.BuildVersion)4 Test (org.junit.jupiter.api.Test)4