From 26291e672b0e683edc9d57710a9a9d96ca199c45 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Sun, 24 Mar 2024 13:14:11 -0500 Subject: Format source code & set explicit UTF-8 --- src/test/java/sevenUnitsGUI/PrefixSearchTest.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/test/java/sevenUnitsGUI/PrefixSearchTest.java') 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()); } - + } -- cgit v1.2.3