Add java 11 (#1048)
This commit is contained in:
@@ -23,18 +23,14 @@
|
||||
|
||||
package com.iluwatar.commander;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.iluwatar.commander.Order;
|
||||
import com.iluwatar.commander.Retry;
|
||||
import com.iluwatar.commander.User;
|
||||
import com.iluwatar.commander.Retry.HandleErrorIssue;
|
||||
import com.iluwatar.commander.Retry.Operation;
|
||||
import com.iluwatar.commander.exceptions.DatabaseUnavailableException;
|
||||
import com.iluwatar.commander.exceptions.ItemUnavailableException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class RetryTest {
|
||||
|
||||
@@ -55,15 +51,15 @@ class RetryTest {
|
||||
e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));
|
||||
User user = new User("Jim", "ABCD");
|
||||
Order order = new Order(user, "book", 10f);
|
||||
ArrayList<Exception> arr1 = new ArrayList<Exception>(Arrays.asList(new Exception[]
|
||||
{new ItemUnavailableException(), new DatabaseUnavailableException()}));
|
||||
ArrayList<Exception> arr1 = new ArrayList<>(List.of(
|
||||
new ItemUnavailableException(), new DatabaseUnavailableException()));
|
||||
try {
|
||||
r1.perform(arr1, order);
|
||||
} catch (Exception e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
ArrayList<Exception> arr2 = new ArrayList<Exception>(Arrays.asList(new Exception[]
|
||||
{new DatabaseUnavailableException(), new ItemUnavailableException()}));
|
||||
ArrayList<Exception> arr2 = new ArrayList<>(List.of(
|
||||
new DatabaseUnavailableException(), new ItemUnavailableException()));
|
||||
try {
|
||||
r2.perform(arr2, order);
|
||||
} catch (Exception e1) {
|
||||
|
Reference in New Issue
Block a user