summaryrefslogtreecommitdiff
path: root/src/test/java/sevenUnitsGUI/PrefixSearchTest.java
diff options
context:
space:
mode:
authorAdrien Hopkins <adrien.p.hopkins@gmail.com>2024-03-24 13:14:11 -0500
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2024-03-24 13:14:11 -0500
commit26291e672b0e683edc9d57710a9a9d96ca199c45 (patch)
treedf88f3d3f110e50f38b8a2752d55df4a0c777677 /src/test/java/sevenUnitsGUI/PrefixSearchTest.java
parentcc45a65c78c578eb404d8773b22e5b046917621f (diff)
Format source code & set explicit UTF-8
Diffstat (limited to 'src/test/java/sevenUnitsGUI/PrefixSearchTest.java')
-rw-r--r--src/test/java/sevenUnitsGUI/PrefixSearchTest.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/java/sevenUnitsGUI/PrefixSearchTest.java b/src/test/java/sevenUnitsGUI/PrefixSearchTest.java
index ca238fe..305d0d7 100644
--- a/src/test/java/sevenUnitsGUI/PrefixSearchTest.java
+++ b/src/test/java/sevenUnitsGUI/PrefixSearchTest.java
@@ -45,7 +45,7 @@ class PrefixSearchTest {
private static final PrefixSearchRule getCommonRuleCopy() {
return getCoherentOnlyRule(Set.of(Metric.KILO, Metric.MILLI));
}
-
+
/**
* Test method for
* {@link sevenUnitsGUI.PrefixSearchRule#apply(java.util.Map.Entry)}, for a
@@ -60,11 +60,11 @@ class PrefixSearchTest {
Metric.KILOMETRE, "millimetre", Metric.MILLIMETRE);
final var actual = COMMON_PREFIXES
.apply(Map.entry("metre", Metric.METRE));
-
+
assertEquals(expected, actual,
"Prefixes not correctly applied to coherent unit.");
}
-
+
/**
* Test method for
* {@link sevenUnitsGUI.PrefixSearchRule#equals(java.lang.Object)}.
@@ -76,11 +76,11 @@ class PrefixSearchTest {
final void testEquals() {
assertEquals(getCommonRuleCopy(), getCommonRuleCopy(),
"equals considers something other than prefixes/rule");
-
+
assertNotEquals(getCoherentOnlyRule(Set.of()), getUniversalRule(Set.of()),
"equals ignores rule");
}
-
+
/**
* Test method for {@link sevenUnitsGUI.PrefixSearchRule#getPrefixes()}.
*
@@ -93,7 +93,7 @@ class PrefixSearchTest {
assertEquals(Metric.ALL_PREFIXES,
PrefixSearchRule.ALL_METRIC_PREFIXES.getPrefixes());
}
-
+
/**
* Test method for {@link sevenUnitsGUI.PrefixSearchRule#hashCode()}.
*
@@ -105,7 +105,7 @@ class PrefixSearchTest {
assertEquals(getCommonRuleCopy().hashCode(),
getCommonRuleCopy().hashCode());
}
-
+
/**
* Tests prefix searching for a non-coherent unit and
* {@link PrefixSearchRule#COMMON_PREFIXES}.
@@ -118,10 +118,10 @@ class PrefixSearchTest {
final var input = Map.entry("inch", BritishImperial.Length.INCH);
final var expected = Map.ofEntries(input);
final var actual = COMMON_PREFIXES.apply(input);
-
+
assertEquals(expected, actual, "Prefixes applied to non-coherent unit.");
}
-
+
/**
* Tests that {@link PrefixSearchRule#NO_PREFIXES} returns the original unit.
*
@@ -141,7 +141,7 @@ class PrefixSearchTest {
}
}
}
-
+
/**
* Test method for {@link sevenUnitsGUI.PrefixSearchRule#toString()}.
*
@@ -154,5 +154,5 @@ class PrefixSearchTest {
"Apply the following prefixes: [kilo (\u00D7 1000.0), milli (\u00D7 0.001)]",
COMMON_PREFIXES.toString());
}
-
+
}