Tests ok
This commit is contained in:
@@ -9,6 +9,9 @@ import javax.persistence.Table;
|
||||
@Table(name = "version")
|
||||
public class FiasVersion {
|
||||
|
||||
public FiasVersion() {
|
||||
}
|
||||
|
||||
public FiasVersion(Long versionId, String textVersion, String fiasCompleteXmlUrl, String fiasDeltaXmlUrl) {
|
||||
this.versionId = versionId;
|
||||
this.textVersion = textVersion;
|
||||
|
||||
@@ -14,7 +14,10 @@ databaseChangeLog:
|
||||
nullable: false
|
||||
- column:
|
||||
name: version_txt
|
||||
type: number
|
||||
type: varchar
|
||||
- column:
|
||||
name: xml_url
|
||||
type: varchar
|
||||
- column:
|
||||
name: delta_xml_url
|
||||
type: varchar
|
||||
|
||||
@@ -36,7 +36,7 @@ public class VersionRepositoryTests {
|
||||
private FiasVersionRepository repository;
|
||||
|
||||
@Test
|
||||
public void testFindByLastName() {
|
||||
public void testFindById() {
|
||||
FiasVersion fiasVersion = new FiasVersion(1L, "last", "c", "d");
|
||||
entityManager.persist(fiasVersion);
|
||||
|
||||
@@ -46,4 +46,16 @@ public class VersionRepositoryTests {
|
||||
|
||||
assertThat(version).extracting(FiasVersion::getVersionId).isEqualTo(fiasVersion.getVersionId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSve() {
|
||||
FiasVersion fiasVersion = new FiasVersion(1L, "last", "c", "d");
|
||||
repository.save(fiasVersion);
|
||||
|
||||
Optional<FiasVersion> byId = repository.findById(fiasVersion.getVersionId());
|
||||
|
||||
FiasVersion version = byId.get();
|
||||
|
||||
assertThat(version).extracting(FiasVersion::getVersionId).isEqualTo(fiasVersion.getVersionId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user