From 1dd51fca4854a6ef7e1aa1fdad22804a0426a96d Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 20 Jul 2023 17:00:14 -0700 Subject: [PATCH] Change unit test scopes --- .../io/parse/BecDefinitionParserTest.java | 2 +- .../BySpeciesDqCoefficientParserTest.java | 4 +- .../vdyp/io/parse/CoefficientParserTest.java | 12 +-- .../io/parse/ComponentSizeParserTest.java | 8 +- .../io/parse/EquationGroupParserTest.java | 18 ++--- .../io/parse/EquationModifierParserTest.java | 12 ++- .../io/parse/HLCoefficientParserTest.java | 12 +-- .../HLNonprimaryCoefficientParserTest.java | 10 +-- .../gov/nrs/vdyp/io/parse/LineParserTest.java | 40 +++++----- .../io/parse/SP0DefinitionParserTest.java | 14 ++-- .../parse/SiteCurveAgeMaximumParserTest.java | 8 +- .../vdyp/io/parse/SiteCurveParserTest.java | 14 ++-- .../SmallComponentProbabilityParserTest.java | 6 +- .../parse/StockingClassFactorParserTest.java | 8 +- .../io/parse/UpperCoefficientParserTest.java | 8 +- .../UtilComponentBaseAreaParserTest.java | 16 ++-- .../vdyp/io/parse/VeteranDQParserTest.java | 10 +-- .../bc/gov/nrs/vdyp/model/MatrixMapTest.java | 20 ++--- .../nrs/vdyp/fip/FipControlParserTest.java | 76 +++++++++---------- .../gov/nrs/vdyp/fip/ModifierParserTest.java | 20 ++--- 20 files changed, 158 insertions(+), 160 deletions(-) diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BecDefinitionParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BecDefinitionParserTest.java index bf9995cb7..3a9266f9c 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BecDefinitionParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BecDefinitionParserTest.java @@ -22,7 +22,7 @@ public class BecDefinitionParserTest { @Test - public void testParse() throws Exception { + void testParse() throws Exception { var parser = new BecDefinitionParser(); var result = parser.parse(ControlFileParserTest.class, "coe/Becdef.dat", Collections.emptyMap()); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BySpeciesDqCoefficientParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BySpeciesDqCoefficientParserTest.java index 7267e2fca..18e087f0d 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BySpeciesDqCoefficientParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/BySpeciesDqCoefficientParserTest.java @@ -10,10 +10,10 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class BySpeciesDqCoefficientParserTest { +class BySpeciesDqCoefficientParserTest { @Test - public void testParseSimple() throws Exception { + void testParseSimple() throws Exception { var parser = new BySpeciesDqCoefficientParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/CoefficientParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/CoefficientParserTest.java index 5cf4f6de9..6eb3d49bf 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/CoefficientParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/CoefficientParserTest.java @@ -13,10 +13,10 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class CoefficientParserTest { +class CoefficientParserTest { @Test - public void testParseSimple() throws Exception { + void testParseSimple() throws Exception { var parser = new CoefficientParser("TEST"); @@ -37,7 +37,7 @@ public void testParseSimple() throws Exception { } @Test - public void testBadBec() throws Exception { + void testBadBec() throws Exception { var parser = new CoefficientParser("TEST"); @@ -54,7 +54,7 @@ public void testBadBec() throws Exception { } @Test - public void testBadIndex() throws Exception { + void testBadIndex() throws Exception { var parser = new CoefficientParser("TEST"); @@ -71,7 +71,7 @@ public void testBadIndex() throws Exception { } @Test - public void testParseDelta() throws Exception { + void testParseDelta() throws Exception { var parser = new CoefficientParser("TEST"); @@ -91,7 +91,7 @@ public void testParseDelta() throws Exception { } @Test - public void testParseFixed() throws Exception { + void testParseFixed() throws Exception { var parser = new CoefficientParser("TEST"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/ComponentSizeParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/ComponentSizeParserTest.java index 8e8ffbf50..1af0070d4 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/ComponentSizeParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/ComponentSizeParserTest.java @@ -14,10 +14,10 @@ import ca.bc.gov.nrs.vdyp.model.Region; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class ComponentSizeParserTest { +class ComponentSizeParserTest { @Test - public void testParseSimpleP1() throws Exception { + void testParseSimpleP1() throws Exception { var is = TestUtils.makeStream("S1 C 49.4 153.3 0.726 3.647"); @@ -33,7 +33,7 @@ public void testParseSimpleP1() throws Exception { } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var is = TestUtils.makeStream("SX C 49.4 153.3 0.726 3.647"); @@ -49,7 +49,7 @@ public void testParseBadSpecies() throws Exception { } @Test - public void testParseBadRegion() throws Exception { + void testParseBadRegion() throws Exception { var is = TestUtils.makeStream("S1 X 49.4 153.3 0.726 3.647"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationGroupParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationGroupParserTest.java index c2c8cf264..007dcdd00 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationGroupParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationGroupParserTest.java @@ -29,10 +29,10 @@ import ca.bc.gov.nrs.vdyp.test.VdypMatchers; @SuppressWarnings("unused") -public class EquationGroupParserTest { +class EquationGroupParserTest { @Test - public void testParse() throws Exception { + void testParse() throws Exception { var parser = new DefaultEquationNumberParser(); var controlMap = makeControlMapSingle(); @@ -45,7 +45,7 @@ public void testParse() throws Exception { } @Test - public void testSP0MustExist() throws Exception { + void testSP0MustExist() throws Exception { var parser = new DefaultEquationNumberParser(); var controlMap = makeControlMapSingle(); @@ -63,7 +63,7 @@ public void testSP0MustExist() throws Exception { } @Test - public void testBecMustExist() throws Exception { + void testBecMustExist() throws Exception { var parser = new DefaultEquationNumberParser(); var controlMap = makeControlMapSingle(); @@ -81,7 +81,7 @@ public void testBecMustExist() throws Exception { } @Test - public void testParseOvewrite() throws Exception { + void testParseOvewrite() throws Exception { // Original Fortran allows subsequent entries to overwrite old ones so don't // validate against that @@ -97,7 +97,7 @@ public void testParseOvewrite() throws Exception { } @Test - public void testParseMultiple() throws Exception { + void testParseMultiple() throws Exception { var parser = new DefaultEquationNumberParser(); var controlMap = makeControlMap(); @@ -118,7 +118,7 @@ public void testParseMultiple() throws Exception { } @Test - public void testRequireNoMissingSp0() throws Exception { + void testRequireNoMissingSp0() throws Exception { var parser = new DefaultEquationNumberParser(); @@ -138,7 +138,7 @@ public void testRequireNoMissingSp0() throws Exception { } @Test - public void testRequireNoMissingBec() throws Exception { + void testRequireNoMissingBec() throws Exception { var parser = new DefaultEquationNumberParser(); @@ -159,7 +159,7 @@ public void testRequireNoMissingBec() throws Exception { } @Test - public void testRequireNoUnexpectedBec() throws Exception { + void testRequireNoUnexpectedBec() throws Exception { var parser = new DefaultEquationNumberParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationModifierParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationModifierParserTest.java index c19b7b9b2..656faea2a 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationModifierParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/EquationModifierParserTest.java @@ -11,23 +11,21 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class EquationModifierParserTest { +class EquationModifierParserTest { @Test - public void testParseSimple() throws Exception { + void testParseSimple() throws Exception { var parser = new EquationModifierParser(); - var is = TestUtils.makeStream( - " 25 18 26" - ); + var is = TestUtils.makeStream(" 25 18 26"); Map controlMap = new HashMap<>(); var result = parser.parse(is, controlMap); - assertThat(result, hasEntry(is(25), hasEntry(is(18), is(26)))); - // indexed + assertThat(result, hasEntry(is(25), hasEntry(is(18), is(26)))); + // indexed } } diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLCoefficientParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLCoefficientParserTest.java index 0f232a3f1..6ca07fed0 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLCoefficientParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLCoefficientParserTest.java @@ -14,10 +14,10 @@ import ca.bc.gov.nrs.vdyp.model.Region; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class HLCoefficientParserTest { +class HLCoefficientParserTest { @Test - public void testParseSimpleP1() throws Exception { + void testParseSimpleP1() throws Exception { var parser = new HLCoefficientParser(HLCoefficientParser.NUM_COEFFICIENTS_P1, "TEST"); @@ -33,7 +33,7 @@ public void testParseSimpleP1() throws Exception { } @Test - public void testParseSimpleP2() throws Exception { + void testParseSimpleP2() throws Exception { var parser = new HLCoefficientParser(HLCoefficientParser.NUM_COEFFICIENTS_P2, "TEST"); @@ -49,7 +49,7 @@ public void testParseSimpleP2() throws Exception { } @Test - public void testParseSimpleP3() throws Exception { + void testParseSimpleP3() throws Exception { var parser = new HLCoefficientParser(HLCoefficientParser.NUM_COEFFICIENTS_P3, "TEST"); @@ -67,7 +67,7 @@ result, mmHasEntry(present(contains(1.04422f, 0.93010f, -0.05745f, -2.50000f)), } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var parser = new HLCoefficientParser(HLCoefficientParser.NUM_COEFFICIENTS_P1, "TEST"); @@ -82,7 +82,7 @@ public void testParseBadSpecies() throws Exception { } @Test - public void testParseBadRegion() throws Exception { + void testParseBadRegion() throws Exception { var parser = new HLCoefficientParser(HLCoefficientParser.NUM_COEFFICIENTS_P1, "TEST"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLNonprimaryCoefficientParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLNonprimaryCoefficientParserTest.java index 9ee507fdf..52eeebdd9 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLNonprimaryCoefficientParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/HLNonprimaryCoefficientParserTest.java @@ -22,7 +22,7 @@ public class HLNonprimaryCoefficientParserTest { @Test - public void testParseSimple() throws Exception { + void testParseSimple() throws Exception { var parser = new HLNonprimaryCoefficientParser(); @@ -38,7 +38,7 @@ public void testParseSimple() throws Exception { } @Test - public void testParseBadSpecies1() throws Exception { + void testParseBadSpecies1() throws Exception { var parser = new HLNonprimaryCoefficientParser(); @@ -53,7 +53,7 @@ public void testParseBadSpecies1() throws Exception { } @Test - public void testParseBadSpecies2() throws Exception { + void testParseBadSpecies2() throws Exception { var parser = new HLNonprimaryCoefficientParser(); @@ -68,7 +68,7 @@ public void testParseBadSpecies2() throws Exception { } @Test - public void testParseBadRegion() throws Exception { + void testParseBadRegion() throws Exception { var parser = new HLNonprimaryCoefficientParser(); @@ -83,7 +83,7 @@ public void testParseBadRegion() throws Exception { } @Test - public void testParseMissingCoefficient() throws Exception { + void testParseMissingCoefficient() throws Exception { var parser = new HLNonprimaryCoefficientParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/LineParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/LineParserTest.java index 9ad1b3d6f..7f8108538 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/LineParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/LineParserTest.java @@ -20,10 +20,10 @@ import org.hamcrest.Matcher; import org.junit.jupiter.api.Test; -public class LineParserTest { +class LineParserTest { @Test - public void testBasic() throws Exception { + void testBasic() throws Exception { var parser = new LineParser(); parser.string(3, "part1").space(1).string(4, "part2"); @@ -35,7 +35,7 @@ public void testBasic() throws Exception { } @Test - public void testNumbers() throws Exception { + void testNumbers() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).floating(5, "part2"); @@ -47,7 +47,7 @@ public void testNumbers() throws Exception { } @Test - public void testIncomplete() throws Exception { + void testIncomplete() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).floating(5, "part2"); @@ -59,7 +59,7 @@ public void testIncomplete() throws Exception { } @Test - public void testIncompleteSegment() throws Exception { + void testIncompleteSegment() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).floating(5, "part2"); @@ -71,7 +71,7 @@ public void testIncompleteSegment() throws Exception { } @Test - public void testNumberParseErrors() throws Exception { + void testNumberParseErrors() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).floating(5, "part2"); @@ -88,7 +88,7 @@ public void testNumberParseErrors() throws Exception { } @Test - public void testValueParser() throws Exception { + void testValueParser() throws Exception { var parser = new LineParser(); parser.value(4, "part1", (s, c) -> Integer.valueOf(s.strip()) + 1).space(1) .value("part2", (s, c) -> Float.valueOf(s.strip()) + 1); @@ -101,7 +101,7 @@ public void testValueParser() throws Exception { } @Test - public void testValueParserError() throws Exception { + void testValueParserError() throws Exception { var parser = new LineParser(); parser.value(4, "part1", (s, c) -> { throw new ValueParseException(s, "Testing"); @@ -114,7 +114,7 @@ public void testValueParserError() throws Exception { } @Test - public void testUnbounded() throws Exception { + void testUnbounded() throws Exception { var parser = new LineParser(); parser.string(4, "part1").string("part2"); @@ -135,7 +135,7 @@ public void testUnbounded() throws Exception { } @Test - public void testStripped() throws Exception { + void testStripped() throws Exception { var parser = new LineParser(); parser.strippedString(4, "part1").strippedString("part2"); @@ -157,7 +157,7 @@ public void testStripped() throws Exception { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiValue() throws Exception { + void testMultiValue() throws Exception { var parser = new LineParser(); parser.multiValue(4, 3, "test", ValueParser.INTEGER); @@ -168,7 +168,7 @@ public void testMultiValue() throws Exception { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLine() throws Exception { + void testMultiLine() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).string("part2"); @@ -193,7 +193,7 @@ public void testMultiLine() throws Exception { } @Test - public void testMultiLineException() throws Exception { + void testMultiLineException() throws Exception { var parser = new LineParser(); parser.integer(4, "part1").space(1).string("part2"); @@ -211,11 +211,11 @@ public void testMultiLineException() throws Exception { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithStopEntry() throws Exception { + void testMultiLineWithStopEntry() throws Exception { var parser = new LineParser() { @Override - public boolean isStopEntry(Map entry) { + protected boolean isStopEntry(Map entry) { return 0 == (int) entry.get("part1"); } @@ -232,7 +232,7 @@ public boolean isStopEntry(Map entry) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithStopLine() throws Exception { + void testMultiLineWithStopLine() throws Exception { var parser = new LineParser() { @Override @@ -253,7 +253,7 @@ public boolean isStopLine(String line) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithStopSegment() throws Exception { + void testMultiLineWithStopSegment() throws Exception { var parser = new LineParser() { @Override @@ -274,7 +274,7 @@ public boolean isStopSegment(List segments) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithIgnoredEntry() throws Exception { + void testMultiLineWithIgnoredEntry() throws Exception { var parser = new LineParser() { @Override @@ -301,7 +301,7 @@ public boolean isIgnoredEntry(Map entry) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithIgnoredLine() throws Exception { + void testMultiLineWithIgnoredLine() throws Exception { var parser = new LineParser() { @Override @@ -328,7 +328,7 @@ public boolean isIgnoredLine(String line) { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test - public void testMultiLineWithIgnoredSegment() throws Exception { + void testMultiLineWithIgnoredSegment() throws Exception { var parser = new LineParser() { @Override diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SP0DefinitionParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SP0DefinitionParserTest.java index 26cf66012..7da4b1e3c 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SP0DefinitionParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SP0DefinitionParserTest.java @@ -25,7 +25,7 @@ public class SP0DefinitionParserTest { @Test - public void testParse() throws Exception { + void testParse() throws Exception { var parser = new SP0DefinitionParser(); var result = parser.parse(ControlFileParserTest.class, "coe/SP0DEF_v0.dat", Collections.emptyMap()); @@ -103,7 +103,7 @@ public void testParse() throws Exception { } @Test - public void testOrderByPreference() throws Exception { + void testOrderByPreference() throws Exception { var parser = new SP0DefinitionParser(2); List result; @@ -130,7 +130,7 @@ public void testOrderByPreference() throws Exception { } @Test - public void testOrderByLinesBlank() throws Exception { + void testOrderByLinesBlank() throws Exception { var parser = new SP0DefinitionParser(2); List result; @@ -157,7 +157,7 @@ public void testOrderByLinesBlank() throws Exception { } @Test - public void testOrderByLinesZero() throws Exception { + void testOrderByLinesZero() throws Exception { var parser = new SP0DefinitionParser(2); List result; @@ -184,7 +184,7 @@ public void testOrderByLinesZero() throws Exception { } @Test - public void testErrorPreferenceOutOfBoundsHigh() throws Exception { + void testErrorPreferenceOutOfBoundsHigh() throws Exception { var parser = new SP0DefinitionParser(2); Exception ex1; @@ -202,7 +202,7 @@ public void testErrorPreferenceOutOfBoundsHigh() throws Exception { } @Test - public void testErrorPreferenceOutOfBoundsLow() throws Exception { + void testErrorPreferenceOutOfBoundsLow() throws Exception { var parser = new SP0DefinitionParser(2); Exception ex1; @@ -220,7 +220,7 @@ public void testErrorPreferenceOutOfBoundsLow() throws Exception { } @Test - public void testErrorPreferenceDuplicate() throws Exception { + void testErrorPreferenceDuplicate() throws Exception { var parser = new SP0DefinitionParser(2); Exception ex1; diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveAgeMaximumParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveAgeMaximumParserTest.java index d283b3946..8e9ccf8db 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveAgeMaximumParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveAgeMaximumParserTest.java @@ -22,7 +22,7 @@ public class SiteCurveAgeMaximumParserTest { @Test - public void testSimple() throws Exception { + void testSimple() throws Exception { var parser = new SiteCurveAgeMaximumParser(); var is = TestUtils.makeStream(" 16 150.0 150.0 20.0 60.0"); @@ -43,7 +43,7 @@ public void testSimple() throws Exception { } @Test - public void testDefault() throws Exception { + void testDefault() throws Exception { var parser = new SiteCurveAgeMaximumParser(); var is = TestUtils.makeStream(" -1 150.0 150.0 20.0 60.0"); @@ -64,7 +64,7 @@ public void testDefault() throws Exception { } @Test - public void testEndLine() throws Exception { + void testEndLine() throws Exception { var parser = new SiteCurveAgeMaximumParser(); var is = TestUtils.makeStream( " -1 150.0 150.0 20.0 60.0", "999 End of usuable info", @@ -90,7 +90,7 @@ public void testEndLine() throws Exception { } @Test - public void testDefaultValue() throws Exception { + void testDefaultValue() throws Exception { var parser = new SiteCurveAgeMaximumParser(); var is = TestUtils.makeStream(" 16 150.0 150.0 20.0 60.0"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveParserTest.java index 3f199caef..9d8de3051 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SiteCurveParserTest.java @@ -17,10 +17,10 @@ import ca.bc.gov.nrs.vdyp.model.SP0Definition; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class SiteCurveParserTest { +class SiteCurveParserTest { @Test - public void testSimple() throws Exception { + void testSimple() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream("S1 001002"); @@ -37,7 +37,7 @@ public void testSimple() throws Exception { } @Test - public void testExtraSpecies() throws Exception { + void testExtraSpecies() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream("S1 001002", "X2 003004"); @@ -55,7 +55,7 @@ public void testExtraSpecies() throws Exception { } @Test - public void testMissingSpecies() throws Exception { + void testMissingSpecies() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream("S1 001002"); @@ -73,7 +73,7 @@ public void testMissingSpecies() throws Exception { } @Test - public void testHashComment() throws Exception { + void testHashComment() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream("# Foo", "S1 001002"); @@ -90,7 +90,7 @@ public void testHashComment() throws Exception { } @Test - public void testSpaceComment() throws Exception { + void testSpaceComment() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream(" Foo", "S1 001002"); @@ -107,7 +107,7 @@ public void testSpaceComment() throws Exception { } @Test - public void testEndFileLine() throws Exception { + void testEndFileLine() throws Exception { var parser = new SiteCurveParser(); var is = TestUtils.makeStream("S1 001002", "##", "S2 003004"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SmallComponentProbabilityParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SmallComponentProbabilityParserTest.java index ae47a7966..192780f0d 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SmallComponentProbabilityParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/SmallComponentProbabilityParserTest.java @@ -15,10 +15,10 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class SmallComponentProbabilityParserTest { +class SmallComponentProbabilityParserTest { @Test - public void testParseSimpleP1() throws Exception { + void testParseSimpleP1() throws Exception { var is = TestUtils.makeStream("S1 0.48205 0.00000 -0.011862 -0.10014"); @@ -33,7 +33,7 @@ public void testParseSimpleP1() throws Exception { } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var is = TestUtils.makeStream("SX 0.48205 0.00000 -0.011862 -0.10014"); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/StockingClassFactorParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/StockingClassFactorParserTest.java index 2ffc8033e..27ceba59c 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/StockingClassFactorParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/StockingClassFactorParserTest.java @@ -14,10 +14,10 @@ import ca.bc.gov.nrs.vdyp.model.Region; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class StockingClassFactorParserTest { +class StockingClassFactorParserTest { @Test - public void testEmpty() throws Exception { + void testEmpty() throws Exception { var parser = new StockingClassFactorParser(); var is = TestUtils.makeStream(""); @@ -27,7 +27,7 @@ public void testEmpty() throws Exception { } @Test - public void testSimple() throws Exception { + void testSimple() throws Exception { var parser = new StockingClassFactorParser(); var is = TestUtils.makeStream("R I P 0 1.00 100", "Z Z P 0 1.00 100"); @@ -46,7 +46,7 @@ public void testSimple() throws Exception { } @Test - public void testMultiple() throws Exception { + void testMultiple() throws Exception { var parser = new StockingClassFactorParser(); try (var is = StockingClassFactorParserTest.class.getResourceAsStream("coe/FIPSTKR.PRM")) { diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UpperCoefficientParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UpperCoefficientParserTest.java index 03c59f741..4cb6d075b 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UpperCoefficientParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UpperCoefficientParserTest.java @@ -17,10 +17,10 @@ import ca.bc.gov.nrs.vdyp.model.SP0Definition; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class UpperCoefficientParserTest { +class UpperCoefficientParserTest { @Test - public void testParseSimple() throws Exception { + void testParseSimple() throws Exception { var parser = new UpperCoefficientParser(); @@ -41,7 +41,7 @@ public void testParseSimple() throws Exception { } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var parser = new UpperCoefficientParser(); @@ -61,7 +61,7 @@ public void testParseBadSpecies() throws Exception { } @Test - public void testParseBadRegion() throws Exception { + void testParseBadRegion() throws Exception { var parser = new UpperCoefficientParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UtilComponentBaseAreaParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UtilComponentBaseAreaParserTest.java index 1c55b7c6f..882e87b43 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UtilComponentBaseAreaParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/UtilComponentBaseAreaParserTest.java @@ -18,10 +18,10 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class UtilComponentBaseAreaParserTest { +class UtilComponentBaseAreaParserTest { @Test - public void testParseSingleBec() throws Exception { + void testParseSingleBec() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -48,7 +48,7 @@ public void testParseSingleBec() throws Exception { } @Test - public void testParseSingleRegion() throws Exception { + void testParseSingleRegion() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -75,7 +75,7 @@ public void testParseSingleRegion() throws Exception { } @Test - public void testParseAllBecs() throws Exception { + void testParseAllBecs() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -103,7 +103,7 @@ public void testParseAllBecs() throws Exception { } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -119,7 +119,7 @@ public void testParseBadSpecies() throws Exception { } @Test - public void testParseBadBec() throws Exception { + void testParseBadBec() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -135,7 +135,7 @@ public void testParseBadBec() throws Exception { } @Test - public void testParseBadBau() throws Exception { + void testParseBadBau() throws Exception { var parser = new UtilComponentBaseAreaParser(); @@ -151,7 +151,7 @@ public void testParseBadBau() throws Exception { } @Test - public void testParseMissingCoefficient() throws Exception { + void testParseMissingCoefficient() throws Exception { var parser = new UtilComponentBaseAreaParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/VeteranDQParserTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/VeteranDQParserTest.java index 78565cbb6..f251e751c 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/VeteranDQParserTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/io/parse/VeteranDQParserTest.java @@ -19,10 +19,10 @@ import ca.bc.gov.nrs.vdyp.model.Region; import ca.bc.gov.nrs.vdyp.test.TestUtils; -public class VeteranDQParserTest { +class VeteranDQParserTest { @Test - public void testParseSingleRegion() throws Exception { + void testParseSingleRegion() throws Exception { var parser = new VeteranDQParser(); @@ -40,7 +40,7 @@ public void testParseSingleRegion() throws Exception { } @Test - public void testParseAllRegions() throws Exception { + void testParseAllRegions() throws Exception { var parser = new VeteranDQParser(); @@ -58,7 +58,7 @@ public void testParseAllRegions() throws Exception { } @Test - public void testParseBadSpecies() throws Exception { + void testParseBadSpecies() throws Exception { var parser = new VeteranDQParser(); @@ -74,7 +74,7 @@ public void testParseBadSpecies() throws Exception { } @Test - public void testParseMissingCoefficient() throws Exception { + void testParseMissingCoefficient() throws Exception { var parser = new VeteranDQParser(); diff --git a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/model/MatrixMapTest.java b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/model/MatrixMapTest.java index 4f5f04f5b..b4032f9af 100644 --- a/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/model/MatrixMapTest.java +++ b/vdyp-core/src/test/java/ca/bc/gov/nrs/vdyp/model/MatrixMapTest.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Map; -import org.hamcrest.Matcher; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -160,7 +159,8 @@ public void testEachKey() { assertThat( result, containsInAnyOrder( - arrayContaining("a", 1), arrayContaining("b", 1), arrayContaining("a", 2), arrayContaining("b", 2) + arrayContaining("a", 1), arrayContaining("b", 1), arrayContaining("a", 2), + arrayContaining("b", 2) ) ); } @@ -170,9 +170,9 @@ public void testToMap() { var dim1 = Arrays.asList("a", "b"); var dims = Arrays.asList(dim1); var map = new MatrixMapImpl(dims); - + map.putM('X', "a"); - + var result = MatrixMap.cast(map, String.class); assertThat(result, isA(Map.class)); assertThat(result.size(), is(2)); @@ -183,24 +183,24 @@ public void testToMap() { assertThat(result.get("a"), is('X')); assertThat(result.get("c"), nullValue()); assertThat(result.isEmpty(), is(false)); - + result.put("b", 'Y'); assertThat(map.getM("b"), present(is('Y'))); - + result.remove("b"); assertThat(map.getM("b"), notPresent()); - + } + @Test public void testToMapMultipleDimensions() { var dim1 = Arrays.asList("a", "b"); var dim2 = Arrays.asList(1, 2); var dims = Arrays.asList(dim1, dim2); var map = new MatrixMapImpl(dims); - - assertThrows(ClassCastException.class, ()->MatrixMap.cast(map, String.class)); - + assertThrows(ClassCastException.class, () -> MatrixMap.cast(map, String.class)); + } } diff --git a/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/FipControlParserTest.java b/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/FipControlParserTest.java index aa8227681..6604025b8 100644 --- a/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/FipControlParserTest.java +++ b/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/FipControlParserTest.java @@ -41,17 +41,17 @@ import ca.bc.gov.nrs.vdyp.model.StockingClassFactor; @SuppressWarnings({ "unused", "unchecked", "rawtypes" }) -public class FipControlParserTest { +class FipControlParserTest { @Test - public void testParse() throws Exception { + void testParse() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); } @Test - public void testParseBec() throws Exception { + void testParseBec() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -64,7 +64,7 @@ public void testParseBec() throws Exception { } @Test - public void testParseSP0() throws Exception { + void testParseSP0() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -77,7 +77,7 @@ public void testParseSP0() throws Exception { } @Test - public void testParseVGRP() throws Exception { + void testParseVGRP() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -98,7 +98,7 @@ FipControlParser.VOLUME_EQN_GROUPS, allOf( } @Test - public void testParseDGRP() throws Exception { + void testParseDGRP() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -119,7 +119,7 @@ FipControlParser.DECAY_GROUPS, allOf( } @Test - public void testParseBGRP() throws Exception { + void testParseBGRP() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -140,7 +140,7 @@ FipControlParser.BREAKAGE_GROUPS, allOf( } @Test - public void testParseGRBA1() throws Exception { + void testParseGRBA1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -161,7 +161,7 @@ FipControlParser.DEFAULT_EQ_NUM, allOf( } @Test - public void testParseGMBA1() throws Exception { + void testParseGMBA1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -182,7 +182,7 @@ FipControlParser.EQN_MODIFIERS, allOf( } @Test - public void testParseSTK33() throws Exception { + void testParseSTK33() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -204,7 +204,7 @@ FipControlParser.STOCKING_CLASS_FACTORS, allOf( } @Test - public void testParseE025() throws Exception { + void testParseE025() throws Exception { var parser = new FipControlParser(); var result = parseWithAppendix(parser, "025 coe/SIEQN.PRM"); assertThat( @@ -218,14 +218,14 @@ FipControlParser.SITE_CURVE_NUMBERS, allOf( } @Test - public void testParseE025Empty() throws Exception { + void testParseE025Empty() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat(result, (Matcher) hasSpecificEntry(FipControlParser.SITE_CURVE_NUMBERS, Matchers.anEmptyMap())); } @Test - public void testParseE026() throws Exception { + void testParseE026() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -240,7 +240,7 @@ FipControlParser.SITE_CURVE_AGE_MAX, allOf( @Test // @Disabled - public void testParseE026Empty() throws Exception { + void testParseE026Empty() throws Exception { var parser = new FipControlParser(); var result = parseWithAppendix(parser, "026 "); // Map is empty but gives appropriate default values @@ -252,7 +252,7 @@ public void testParseE026Empty() throws Exception { } @Test - public void testParseE040() throws Exception { + void testParseE040() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -262,7 +262,7 @@ public void testParseE040() throws Exception { } @Test - public void testParseE041() throws Exception { + void testParseE041() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -272,7 +272,7 @@ public void testParseE041() throws Exception { } @Test - public void testParseE043() throws Exception { + void testParseE043() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -285,7 +285,7 @@ public void testParseE043() throws Exception { } @Test - public void testParseE050() throws Exception { + void testParseE050() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -298,7 +298,7 @@ public void testParseE050() throws Exception { } @Test - public void testParseE051() throws Exception { + void testParseE051() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -311,7 +311,7 @@ public void testParseE051() throws Exception { } @Test - public void testParseE052() throws Exception { + void testParseE052() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -329,7 +329,7 @@ public void testParseE052() throws Exception { } @Test - public void testParseE053() throws Exception { + void testParseE053() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -347,7 +347,7 @@ public void testParseE053() throws Exception { } @Test - public void testParseE060() throws Exception { + void testParseE060() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -375,7 +375,7 @@ public void testParseE060() throws Exception { } @Test - public void testParseE061() throws Exception { + void testParseE061() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -388,7 +388,7 @@ public void testParseE061() throws Exception { } @Test - public void testParseUBA1() throws Exception { + void testParseUBA1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -401,7 +401,7 @@ public void testParseUBA1() throws Exception { } @Test - public void testParseYVC1() throws Exception { + void testParseYVC1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -414,7 +414,7 @@ public void testParseYVC1() throws Exception { } @Test - public void testParseYVD1() throws Exception { + void testParseYVD1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -427,7 +427,7 @@ public void testParseYVD1() throws Exception { } @Test - public void testParseSBA1() throws Exception { + void testParseSBA1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -440,7 +440,7 @@ public void testParseSBA1() throws Exception { } @Test - public void testParseSBA2() throws Exception { + void testParseSBA2() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -453,7 +453,7 @@ public void testParseSBA2() throws Exception { } @Test - public void testParseSDQ1() throws Exception { + void testParseSDQ1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -465,7 +465,7 @@ FipControlParser.SMALL_COMP_DQ, allOf(hasEntry(is("B"), contains(-0.33485f, 0.02 } @Test - public void testParseSHL1() throws Exception { + void testParseSHL1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -477,7 +477,7 @@ FipControlParser.SMALL_COMP_HL, allOf(hasEntry(is("B"), contains(-8.5269f, -0.20 } @Test - public void testParseSVT1() throws Exception { + void testParseSVT1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -490,7 +490,7 @@ public void testParseSVT1() throws Exception { } @Test - public void testParseYVT1() throws Exception { + void testParseYVT1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -511,7 +511,7 @@ public void testParseYVT1() throws Exception { } @Test - public void testParseYVT2() throws Exception { + void testParseYVT2() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -524,7 +524,7 @@ public void testParseYVT2() throws Exception { } @Test - public void testParseYVW1() throws Exception { + void testParseYVW1() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -537,7 +537,7 @@ public void testParseYVW1() throws Exception { } @Test - public void testParseE095() throws Exception { + void testParseE095() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -549,7 +549,7 @@ FipControlParser.BREAKAGE, allOf(hasEntry(is(10), contains(-0.7153f, 2.0108f, 4. } @Test - public void testParseYVVET() throws Exception { + void testParseYVVET() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -562,7 +562,7 @@ public void testParseYVVET() throws Exception { } @Test - public void testParseYDQV() throws Exception { + void testParseYDQV() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( @@ -580,7 +580,7 @@ public void testParseYDQV() throws Exception { } @Test - public void testParseE098() throws Exception { + void testParseE098() throws Exception { var parser = new FipControlParser(); var result = parser.parse(ControlFileParserTest.class, "FIPSTART.CTR"); assertThat( diff --git a/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/ModifierParserTest.java b/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/ModifierParserTest.java index a2a0e0a5b..a2c05d93d 100644 --- a/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/ModifierParserTest.java +++ b/vdyp-fip/src/test/java/ca/bc/gov/nrs/vdyp/fip/ModifierParserTest.java @@ -38,10 +38,10 @@ import ca.bc.gov.nrs.vdyp.test.TestUtils; @SuppressWarnings({ "unchecked", "rawtypes" }) -public class ModifierParserTest { +class ModifierParserTest { @Test - public void testNoFilenameForControlFile() throws Exception { + void testNoFilenameForControlFile() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -70,7 +70,7 @@ public String toString(String filename) throws IOException { } @Test - public void testMissingControlFile() throws Exception { + void testMissingControlFile() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -101,7 +101,7 @@ public String toString(String filename) throws IOException { } @Test - public void testLoadEmptyFile() throws Exception { + void testLoadEmptyFile() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -177,7 +177,7 @@ protected void modifierDefaultAsserts(Map controlMap) { } @Test - public void testBaDqSpecies() throws Exception { + void testBaDqSpecies() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -236,7 +236,7 @@ public String toString(String filename) throws IOException { } @Test - public void testBaDqSpeciesDifferentProgram() throws Exception { + void testBaDqSpeciesDifferentProgram() throws Exception { var parser = new ModifierParser(3); Map controlMap = new HashMap<>(); @@ -272,7 +272,7 @@ public String toString(String filename) throws IOException { } @Test - public void testIgnoreAfterStop() throws Exception { + void testIgnoreAfterStop() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -308,7 +308,7 @@ public String toString(String filename) throws IOException { } @Test - public void testIgnoreCommentsAndBlanks() throws Exception { + void testIgnoreCommentsAndBlanks() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -367,7 +367,7 @@ public String toString(String filename) throws IOException { } @Test - public void testBaDqAllSpecies() throws Exception { + void testBaDqAllSpecies() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>(); @@ -418,7 +418,7 @@ public String toString(String filename) throws IOException { } @Test - public void testVetBq() throws Exception { + void testVetBq() throws Exception { var parser = new ModifierParser(1); Map controlMap = new HashMap<>();