Last active
August 29, 2015 14:11
-
-
Save elaPa/b0fdffe282633d746fe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aistemos.models; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import io.dropwizard.jackson.Jackson; | |
import org.junit.Test; | |
import java.io.File; | |
import java.io.IOException; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.core.Is.is; | |
public class SimpleTest { | |
private static final ObjectMapper MAPPER = Jackson.newObjectMapper(); | |
@Test | |
public void shouldDeserialize() throws IOException { | |
final Simple actual = MAPPER.readValue(new File(SimpleTest.class.getResource("/fixtures/simple.json").getPath()), | |
Simple.class); | |
Simple expected = ImmutableSimple.builder().name("simpleName").build(); | |
assertThat(actual, is(expected)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment