diff options
Diffstat (limited to 'src/test/java/sevenUnitsGUI')
-rw-r--r-- | src/test/java/sevenUnitsGUI/I18nTest.java | 7 | ||||
-rw-r--r-- | src/test/java/sevenUnitsGUI/PrefixRepetitionTest.java | 10 | ||||
-rw-r--r-- | src/test/java/sevenUnitsGUI/PrefixSearchTest.java | 16 | ||||
-rw-r--r-- | src/test/java/sevenUnitsGUI/PresenterTest.java | 26 | ||||
-rw-r--r-- | src/test/java/sevenUnitsGUI/RoundingTest.java | 23 | ||||
-rw-r--r-- | src/test/java/sevenUnitsGUI/TabbedViewTest.java | 8 |
6 files changed, 48 insertions, 42 deletions
diff --git a/src/test/java/sevenUnitsGUI/I18nTest.java b/src/test/java/sevenUnitsGUI/I18nTest.java index 2875db6..1513373 100644 --- a/src/test/java/sevenUnitsGUI/I18nTest.java +++ b/src/test/java/sevenUnitsGUI/I18nTest.java @@ -20,12 +20,17 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import org.junit.jupiter.api.Test; +/** + * Tests for the internationalization system. + * + * @since v1.0.0 + */ class I18nTest { /** * Tests that the default locale exists. * - * Currently this test fails. + * @since v1.0.0 */ @Test void testDefaultLocale() { diff --git a/src/test/java/sevenUnitsGUI/PrefixRepetitionTest.java b/src/test/java/sevenUnitsGUI/PrefixRepetitionTest.java index ce75cca..50b390b 100644 --- a/src/test/java/sevenUnitsGUI/PrefixRepetitionTest.java +++ b/src/test/java/sevenUnitsGUI/PrefixRepetitionTest.java @@ -31,15 +31,15 @@ import sevenUnits.unit.Metric; /** * Tests for the default prefix repetition rules. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ class PrefixRepetitionTest { /** * Ensures that the complex repetition rule disallows invalid prefix lists. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testInvalidComplexRepetition() { @@ -58,8 +58,8 @@ class PrefixRepetitionTest { /** * Tests the {@code NO_REPETITION} rule. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testNoRepetition() { @@ -72,8 +72,8 @@ class PrefixRepetitionTest { /** * Tests the {@code NO_RESTRICTION} rule. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testNoRestriction() { @@ -86,8 +86,8 @@ class PrefixRepetitionTest { /** * Ensures that the complex repetition rule allows valid prefix lists. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testValidComplexRepetition() { diff --git a/src/test/java/sevenUnitsGUI/PrefixSearchTest.java b/src/test/java/sevenUnitsGUI/PrefixSearchTest.java index c7c652b..b605d05 100644 --- a/src/test/java/sevenUnitsGUI/PrefixSearchTest.java +++ b/src/test/java/sevenUnitsGUI/PrefixSearchTest.java @@ -36,8 +36,8 @@ import sevenUnits.unit.Metric; /** * Tests for {@link PrefixSearchRule} * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ class PrefixSearchTest { /** @@ -52,8 +52,8 @@ class PrefixSearchTest { * {@link sevenUnitsGUI.PrefixSearchRule#apply(java.util.Map.Entry)}, for a * coherent unit and {@link PrefixSearchRule#COMMON_PREFIXES}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testCoherentPrefixSearch() { @@ -70,8 +70,8 @@ class PrefixSearchTest { * Test method for * {@link sevenUnitsGUI.PrefixSearchRule#equals(java.lang.Object)}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testEquals() { @@ -85,8 +85,8 @@ class PrefixSearchTest { /** * Test method for {@link sevenUnitsGUI.PrefixSearchRule#getPrefixes()}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testGetPrefixes() { @@ -98,8 +98,8 @@ class PrefixSearchTest { /** * Test method for {@link sevenUnitsGUI.PrefixSearchRule#hashCode()}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testHashCode() { @@ -111,8 +111,8 @@ class PrefixSearchTest { * Tests prefix searching for a non-coherent unit and * {@link PrefixSearchRule#COMMON_PREFIXES}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testNonCoherentPrefixSearch() { @@ -126,8 +126,8 @@ class PrefixSearchTest { /** * Tests that {@link PrefixSearchRule#NO_PREFIXES} returns the original unit. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testNoPrefixes() { @@ -146,8 +146,8 @@ class PrefixSearchTest { /** * Test method for {@link sevenUnitsGUI.PrefixSearchRule#toString()}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test final void testToString() { diff --git a/src/test/java/sevenUnitsGUI/PresenterTest.java b/src/test/java/sevenUnitsGUI/PresenterTest.java index 20d0c8a..9ac5b84 100644 --- a/src/test/java/sevenUnitsGUI/PresenterTest.java +++ b/src/test/java/sevenUnitsGUI/PresenterTest.java @@ -55,8 +55,8 @@ import sevenUnits.utils.UncertainDouble; * * @author Adrien Hopkins * - * @since v0.4.0 * @since 2022-02-10 + * @since v0.4.0 */ public final class PresenterTest { private static final Path TEST_SETTINGS = Path.of("src", "test", "resources", @@ -73,8 +73,8 @@ public final class PresenterTest { /** * @return rounding rules used by {@link #testRoundingRules} - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ private static Stream<Function<UncertainDouble, String>> getRoundingRules() { final var SCIENTIFIC_ROUNDING = StandardDisplayRules.uncertaintyBased(); @@ -108,8 +108,8 @@ public final class PresenterTest { /** * Test method for {@link Presenter#convertExpressions} * - * @since v0.4.0 * @since 2022-02-12 + * @since v0.4.0 */ @ParameterizedTest @MethodSource @@ -132,8 +132,8 @@ public final class PresenterTest { /** * Test method for {@link Presenter#convertUnits} * - * @since v0.4.0 * @since 2022-02-12 + * @since v0.4.0 */ @ParameterizedTest @MethodSource @@ -158,8 +158,8 @@ public final class PresenterTest { /** * Ensures that the default unitfile can be disabled. * - * @since v1.0.0 * @since 2025-02-23 + * @since v1.0.0 */ @Test void testDisableDefault() { @@ -175,8 +175,8 @@ public final class PresenterTest { /** * Tests that duplicate units are successfully removed, if that is asked for * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @Test void testDuplicateUnits() { @@ -208,8 +208,8 @@ public final class PresenterTest { /** * Tests that one-way conversion correctly filters From and To units * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @Test void testOneWayConversion() { @@ -242,8 +242,8 @@ public final class PresenterTest { /** * Tests the prefix-viewing functionality. * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @Test void testPrefixViewing() { @@ -272,8 +272,8 @@ public final class PresenterTest { /** * Tests that rounding rules are used correctly. * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @ParameterizedTest @MethodSource("getRoundingRules") @@ -301,8 +301,8 @@ public final class PresenterTest { * Tests that the Presenter correctly applies search rules. * * @param searchRule search rule to test - * @since v0.4.0 * @since 2022-07-08 + * @since v0.4.0 */ @ParameterizedTest @MethodSource("getSearchRules") @@ -335,8 +335,8 @@ public final class PresenterTest { /** * Tests that settings can be saved to and loaded from a file. * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @Test void testSettingsSaving() { @@ -369,8 +369,8 @@ public final class PresenterTest { /** * Ensures the Presenter generates the correct data upon a unit-viewing. * - * @since v0.4.0 * @since 2022-04-16 + * @since v0.4.0 */ @Test void testUnitViewing() { @@ -403,8 +403,8 @@ public final class PresenterTest { /** * Test for {@link Presenter#updateView()} * - * @since v0.4.0 * @since 2022-02-12 + * @since v0.4.0 */ @Test void testUpdateView() { diff --git a/src/test/java/sevenUnitsGUI/RoundingTest.java b/src/test/java/sevenUnitsGUI/RoundingTest.java index 535167c..e6453f2 100644 --- a/src/test/java/sevenUnitsGUI/RoundingTest.java +++ b/src/test/java/sevenUnitsGUI/RoundingTest.java @@ -41,8 +41,8 @@ import sevenUnitsGUI.StandardDisplayRules.UncertaintyBased; /** * Tests that ensure the rounding rules work as intended. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ class RoundingTest { // rounding rules to test @@ -69,8 +69,8 @@ class RoundingTest { /** * @return arguments for * {@link #testFixedDecimalRounding(UncertainDouble, String, String, String)} - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ private static final Stream<Arguments> fixedDecimalRoundingExamples() { // input, zero decimal string, two decimal string, six decimal string @@ -83,8 +83,8 @@ class RoundingTest { /** * @return arguments for * {@link #testFixedPrecisionRounding(UncertainDouble, String, String, String)} - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ private static final Stream<Arguments> fixedPrecisionRoundingExamples() { // input, one sig fig string, three s.f. string, six s.f. string @@ -97,8 +97,8 @@ class RoundingTest { /** * @return arguments for * {@link #testUncertaintyRounding(UncertainDouble, String)} - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ private static final Stream<Arguments> uncertaintyRoundingExamples() { // input, uncertainty rounding string @@ -112,8 +112,8 @@ class RoundingTest { * Test for {@link FixedDecimals#decimalPlaces()} and * {@link FixedPrecision#significantFigures()}. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testDataMethods() { @@ -138,8 +138,8 @@ class RoundingTest { /** * Tests that the rounding methods' equals() methods work. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testEquals() { @@ -174,6 +174,7 @@ class RoundingTest { * @param twoDecimalString expected string for two decimal places * @param sixDecimalString expected string for six decimal places * @since 2022-07-17 + * @since v0.4.0 */ @ParameterizedTest @MethodSource("fixedDecimalRoundingExamples") @@ -200,8 +201,8 @@ class RoundingTest { * @param oneSigFigString expected string for one significant figure * @param threeSigFigString expected string for three significant figures * @param twelveSigFigString expected string for twelve significant figures - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @ParameterizedTest @MethodSource("fixedPrecisionRoundingExamples") @@ -226,8 +227,8 @@ class RoundingTest { * Tests that {@link StandardDisplayRules#getStandardRule} gets rounding * rules as intended. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testGetStandardRule() { @@ -244,8 +245,8 @@ class RoundingTest { /** * Tests that the rounding methods' equals() methods work. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testHashCode() { @@ -258,8 +259,8 @@ class RoundingTest { * Tests that the {@code toString()} methods of the three rounding rule * classes work correctly. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testToString() { @@ -273,8 +274,8 @@ class RoundingTest { * * @param input input number * @param output expected output string - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @ParameterizedTest @MethodSource("uncertaintyRoundingExamples") diff --git a/src/test/java/sevenUnitsGUI/TabbedViewTest.java b/src/test/java/sevenUnitsGUI/TabbedViewTest.java index 7819452..3716673 100644 --- a/src/test/java/sevenUnitsGUI/TabbedViewTest.java +++ b/src/test/java/sevenUnitsGUI/TabbedViewTest.java @@ -26,16 +26,16 @@ import org.junit.jupiter.api.Timeout; /** * Test for the TabbedView. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Timeout(value = 10, unit = TimeUnit.SECONDS) class TabbedViewTest { /** * @return a view with all settings set to standard values * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ private static final TabbedView setupView() { final var view = new TabbedView(); @@ -55,8 +55,8 @@ class TabbedViewTest { * Simulates an expression conversion operation, and ensures it works * properly. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testExpressionConversion() { @@ -76,8 +76,8 @@ class TabbedViewTest { /** * Simulates a unit conversion operation, and ensures it works properly. * - * @since v0.4.0 * @since 2022-07-17 + * @since v0.4.0 */ @Test void testUnitConversion() { |