rename put method to help IDEs find references
This commit is contained in:
@@ -5,9 +5,9 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.lucares.utils.file.FileUtils;
|
||||
|
||||
public class UniqueStringIntegerPairsTest {
|
||||
@@ -33,7 +33,7 @@ public class UniqueStringIntegerPairsTest {
|
||||
{
|
||||
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
||||
|
||||
usip.put(first, second);
|
||||
usip.putStringAndInteger(first, second);
|
||||
Assertions.assertEquals(second, usip.get(first));
|
||||
Assertions.assertEquals(first, usip.getKey(second));
|
||||
}
|
||||
@@ -53,11 +53,11 @@ public class UniqueStringIntegerPairsTest {
|
||||
final Integer second = 1;
|
||||
|
||||
final UniqueStringIntegerPairs usip = new UniqueStringIntegerPairs(database);
|
||||
usip.put(first, second);
|
||||
usip.putStringAndInteger(first, second);
|
||||
try {
|
||||
// cannot add another pair with the first key
|
||||
final int another = second + 1;
|
||||
usip.put(first, another);
|
||||
usip.putStringAndInteger(first, another);
|
||||
Assertions.fail("expected an IllegalArgumentException");
|
||||
} catch (final IllegalArgumentException e) {
|
||||
// expected
|
||||
@@ -66,7 +66,7 @@ public class UniqueStringIntegerPairsTest {
|
||||
try {
|
||||
// cannot add another pair with the same second value
|
||||
final String another = first + 1;
|
||||
usip.put(another, second);
|
||||
usip.putStringAndInteger(another, second);
|
||||
Assertions.fail("expected an IllegalArgumentException");
|
||||
} catch (final IllegalArgumentException e) {
|
||||
// expected
|
||||
|
||||
Reference in New Issue
Block a user