28 lines
876 B
Java
28 lines
876 B
Java
package com.moparisthebest.jdbc.codegen;
|
|
|
|
import org.junit.Test;
|
|
|
|
import java.io.IOException;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Paths;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
/**
|
|
* Created by mopar on 5/24/17.
|
|
*/
|
|
public class PrestoPersonDAOTest {
|
|
|
|
@Test
|
|
public void testGeneratedFilesAreTheSame() throws IOException {
|
|
final String personDaoBean = new String(
|
|
Files.readAllBytes(Paths.get("target/generated-sources/annotations/com/moparisthebest/jdbc/codegen/PersonDAOBean.java"))
|
|
, StandardCharsets.UTF_8);
|
|
final String prestoPersonDaoBean = new String(
|
|
Files.readAllBytes(Paths.get("target/generated-sources/annotations/com/moparisthebest/jdbc/codegen/PrestoPersonDAOBean.java"))
|
|
, StandardCharsets.UTF_8).replace("Presto", "");
|
|
assertEquals(personDaoBean, prestoPersonDaoBean);
|
|
}
|
|
}
|