summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Hopkins <ahopk127@my.yorku.ca>2022-07-17 15:55:27 -0500
committerAdrien Hopkins <ahopk127@my.yorku.ca>2022-07-17 15:55:27 -0500
commit6015694bbec91db777530d1cba1be34b832e9a8a (patch)
tree0993f6cb75d681691e0f7a01e294c68803b4667c
parent8f539b4462ab10d02d94730ea8ae6f2fe9685fbe (diff)
Misc test documentation tweaksv0.4.0rc1
-rw-r--r--src/main/java/sevenUnitsGUI/TabbedView.java9
-rw-r--r--src/test/java/sevenUnitsGUI/PresenterTest.java19
2 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/sevenUnitsGUI/TabbedView.java b/src/main/java/sevenUnitsGUI/TabbedView.java
index dfea2c6..6181eae 100644
--- a/src/main/java/sevenUnitsGUI/TabbedView.java
+++ b/src/main/java/sevenUnitsGUI/TabbedView.java
@@ -64,6 +64,7 @@ import sevenUnits.utils.UncertainDouble;
/**
* A View that separates its functions into multiple tabs
*
+ * @since v0.4.0
* @since 2022-02-19
*/
final class TabbedView implements ExpressionConversionView, UnitConversionView {
@@ -72,6 +73,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
*
* @param <E> type of item in list
*
+ * @since v0.4.0
* @since 2022-02-19
*/
private static final class JComboBoxItemSet<E> extends AbstractSet<E> {
@@ -117,6 +119,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
* The standard types of rounding, corresponding to the options on the
* TabbedView's settings panel.
*
+ * @since v0.4.0
* @since 2022-04-18
*/
private static enum StandardRoundingType {
@@ -141,6 +144,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
* Creates a TabbedView.
*
* @param args command line arguments
+ * @since v0.4.0
* @since 2022-02-19
*/
public static void main(String[] args) {
@@ -198,6 +202,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
/**
* Creates the view and makes it visible to the user
*
+ * @since v0.4.0
* @since 2022-02-19
*/
public TabbedView() {
@@ -657,6 +662,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
/**
* @return the precision of the presenter's rounding rule, if that is
* meaningful
+ * @since v0.4.0
* @since 2022-04-18
*/
private OptionalInt getPresenterPrecision() {
@@ -675,6 +681,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
/**
* @return presenter's prefix repetition rule
+ * @since v0.4.0
* @since 2022-04-19
*/
private Optional<DefaultPrefixRepetitionRule> getPresenterPrefixRule() {
@@ -687,6 +694,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
/**
* Determines which rounding type the presenter is currently using, if any.
*
+ * @since v0.4.0
* @since 2022-04-18
*/
private Optional<StandardRoundingType> getPresenterRoundingType() {
@@ -799,6 +807,7 @@ final class TabbedView implements ExpressionConversionView, UnitConversionView {
* Sets the presenter's rounding rule to the one specified by the current
* settings
*
+ * @since v0.4.0
* @since 2022-04-18
*/
private void updatePresenterRoundingRule() {
diff --git a/src/test/java/sevenUnitsGUI/PresenterTest.java b/src/test/java/sevenUnitsGUI/PresenterTest.java
index 1379abd..13d7986 100644
--- a/src/test/java/sevenUnitsGUI/PresenterTest.java
+++ b/src/test/java/sevenUnitsGUI/PresenterTest.java
@@ -39,6 +39,7 @@ import sevenUnits.unit.LinearUnit;
import sevenUnits.unit.LinearUnitValue;
import sevenUnits.unit.Metric;
import sevenUnits.unit.Unit;
+import sevenUnits.unit.UnitDatabase;
import sevenUnits.unit.UnitType;
import sevenUnits.utils.NameSymbol;
import sevenUnits.utils.Nameable;
@@ -46,8 +47,15 @@ import sevenUnits.utils.ObjectProduct;
import sevenUnits.utils.UncertainDouble;
/**
+ * Various tests for the {@link Presenter}.
+ * <p>
+ * <em>Note: this test outputs a lot to the standard output, because creating a
+ * {@link UnitDatabase} and converting with a {@link ViewBot} both trigger
+ * println statements.</em>
+ *
* @author Adrien Hopkins
*
+ * @since v0.4.0
* @since 2022-02-10
*/
public final class PresenterTest {
@@ -65,6 +73,7 @@ public final class PresenterTest {
/**
* @return rounding rules used by {@link #testRoundingRules}
+ * @since v0.4.0
* @since 2022-04-16
*/
private static final Stream<Function<UncertainDouble, String>> getRoundingRules() {
@@ -86,6 +95,7 @@ public final class PresenterTest {
/**
* Test method for {@link Presenter#convertExpressions}
*
+ * @since v0.4.0
* @since 2022-02-12
*/
@Test
@@ -110,6 +120,7 @@ public final class PresenterTest {
/**
* Tests that unit-conversion Views can correctly convert units
*
+ * @since v0.4.0
* @since 2022-02-12
*/
@Test
@@ -146,6 +157,7 @@ public final class PresenterTest {
/**
* Tests that duplicate units are successfully removed, if that is asked for
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@Test
@@ -178,6 +190,7 @@ public final class PresenterTest {
/**
* Tests that one-way conversion correctly filters From and To units
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@Test
@@ -211,6 +224,7 @@ public final class PresenterTest {
/**
* Tests the prefix-viewing functionality.
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@Test
@@ -240,6 +254,7 @@ public final class PresenterTest {
/**
* Tests that rounding rules are used correctly.
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@ParameterizedTest
@@ -268,6 +283,7 @@ 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
*/
@ParameterizedTest
@@ -301,6 +317,7 @@ public final class PresenterTest {
/**
* Tests that settings can be saved to and loaded from a file.
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@Test
@@ -333,6 +350,7 @@ public final class PresenterTest {
/**
* Ensures the Presenter generates the correct data upon a unit-viewing.
*
+ * @since v0.4.0
* @since 2022-04-16
*/
@Test
@@ -366,6 +384,7 @@ public final class PresenterTest {
/**
* Test for {@link Presenter#updateView()}
*
+ * @since v0.4.0
* @since 2022-02-12
*/
@Test