Java 11 migration: patterns (t-v) (#1085)
* Moves visitor pattern to java 11 * Moves value-object pattern to java 11 * Moves unit-of-work pattern to java 11 * Moves typeobjectpattern pattern to java 11 * Moves twin pattern to java 11 * Moves trampoline pattern to java 11 * Moves tolerant-reader pattern to java 11 * Moves tls pattern to java 11 * Moves throttling pattern to java 11 * Moves thread-pool pattern to java 11 * Moves template-method pattern to java 11
This commit is contained in:
committed by
Ilkka Seppälä
parent
160b737dcc
commit
50467c9e76
@@ -23,16 +23,15 @@
|
||||
|
||||
package com.iluwatar.tolerantreader;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
|
||||
import java.io.File;
|
||||
import org.junit.Rule;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
|
||||
/**
|
||||
* Date: 12/30/15 - 18:39 PM
|
||||
*
|
||||
@@ -62,10 +61,10 @@ public class RainbowFishSerializerTest {
|
||||
*/
|
||||
@Test
|
||||
public void testWriteV1ReadV1() throws Exception {
|
||||
final File outputFile = this.testFolder.newFile();
|
||||
final var outputFile = this.testFolder.newFile();
|
||||
RainbowFishSerializer.writeV1(V1, outputFile.getPath());
|
||||
|
||||
final RainbowFish fish = RainbowFishSerializer.readV1(outputFile.getPath());
|
||||
final var fish = RainbowFishSerializer.readV1(outputFile.getPath());
|
||||
assertNotSame(V1, fish);
|
||||
assertEquals(V1.getName(), fish.getName());
|
||||
assertEquals(V1.getAge(), fish.getAge());
|
||||
@@ -79,10 +78,10 @@ public class RainbowFishSerializerTest {
|
||||
*/
|
||||
@Test
|
||||
public void testWriteV2ReadV1() throws Exception {
|
||||
final File outputFile = this.testFolder.newFile();
|
||||
final var outputFile = this.testFolder.newFile();
|
||||
RainbowFishSerializer.writeV2(V2, outputFile.getPath());
|
||||
|
||||
final RainbowFish fish = RainbowFishSerializer.readV1(outputFile.getPath());
|
||||
final var fish = RainbowFishSerializer.readV1(outputFile.getPath());
|
||||
assertNotSame(V2, fish);
|
||||
assertEquals(V2.getName(), fish.getName());
|
||||
assertEquals(V2.getAge(), fish.getAge());
|
||||
|
Reference in New Issue
Block a user