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:25:22 -0500
committerAdrien Hopkins <adrien.p.hopkins@gmail.com>2024-03-24 13:25:22 -0500
commited53492243ecad8d975401a97f5b634328ad2c71 (patch)
tree8a744f46320710355a02c9b2c371602ce69aefec /src/test/java/sevenUnitsGUI/PrefixSearchTest.java
parentc878761f737c90fc3fa1caedd48e2ee01637108f (diff)
parent91d51c3c49c4c0877483220ac0f12db4efab8f60 (diff)
Release version 0.5.0 (merge into stable)
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());
}
-
+
}