Java 11 migrate c-d (remaining) (#1111)
* Moves converter pattern to Java 11 * Moves cqrs pattern to Java 11 * Moves dao pattern to Java 11 * Moves data-bus pattern to Java 11 * Moves data-locality pattern to Java 11 * Moves data-mapper pattern to Java 11 * Moves data-transfer-object pattern to Java 11 * Moves decorator pattern to Java 11 * Moves delegation pattern to Java 11 * Moves dependency-injection to Java 11 * Moves dirty-flag to Java 11 * Moves double-buffer to Java 11 * Moves double-checked-locking to Java 11 * Moves double-dispatch to Java 11 * Corrects with changes thats breaking test cases
This commit is contained in:
committed by
Ilkka Seppälä
parent
5681684157
commit
ea57934db6
@ -23,11 +23,11 @@
|
||||
|
||||
package com.iluwatar.datamapper;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* The Data Mapper (DM) is a layer of software that separates the in-memory objects from the
|
||||
* database. Its responsibility is to transfer data between the two and also to isolate them from
|
||||
@ -46,11 +46,11 @@ public class DataMapperTest {
|
||||
public void testFirstDataMapper() {
|
||||
|
||||
/* Create new data mapper of first type */
|
||||
final StudentDataMapper mapper = new StudentDataMapperImpl();
|
||||
final var mapper = new StudentDataMapperImpl();
|
||||
|
||||
/* Create new student */
|
||||
int studentId = 1;
|
||||
Student student = new Student(studentId, "Adam", 'A');
|
||||
var studentId = 1;
|
||||
var student = new Student(studentId, "Adam", 'A');
|
||||
|
||||
/* Add student in respectibe db */
|
||||
mapper.insert(student);
|
||||
@ -59,7 +59,7 @@ public class DataMapperTest {
|
||||
assertEquals(studentId, mapper.find(student.getStudentId()).get().getStudentId());
|
||||
|
||||
/* Update existing student object */
|
||||
String updatedName = "AdamUpdated";
|
||||
var updatedName = "AdamUpdated";
|
||||
student = new Student(student.getStudentId(), updatedName, 'A');
|
||||
|
||||
/* Update student in respectibe db */
|
||||
|
Reference in New Issue
Block a user