Skip to content

Commit

Permalink
Change unit test scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
smithkm committed Jul 21, 2023
1 parent b72a0ed commit 1dd51fc
Show file tree
Hide file tree
Showing 20 changed files with 158 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -37,7 +37,7 @@ public void testParseSimple() throws Exception {
}

@Test
public void testBadBec() throws Exception {
void testBadBec() throws Exception {

var parser = new CoefficientParser("TEST");

Expand All @@ -54,7 +54,7 @@ public void testBadBec() throws Exception {
}

@Test
public void testBadIndex() throws Exception {
void testBadIndex() throws Exception {

var parser = new CoefficientParser("TEST");

Expand All @@ -71,7 +71,7 @@ public void testBadIndex() throws Exception {
}

@Test
public void testParseDelta() throws Exception {
void testParseDelta() throws Exception {

var parser = new CoefficientParser("TEST");

Expand All @@ -91,7 +91,7 @@ public void testParseDelta() throws Exception {
}

@Test
public void testParseFixed() throws Exception {
void testParseFixed() throws Exception {

var parser = new CoefficientParser("TEST");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");

Expand All @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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

Expand All @@ -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();
Expand All @@ -118,7 +118,7 @@ public void testParseMultiple() throws Exception {
}

@Test
public void testRequireNoMissingSp0() throws Exception {
void testRequireNoMissingSp0() throws Exception {

var parser = new DefaultEquationNumberParser();

Expand All @@ -138,7 +138,7 @@ public void testRequireNoMissingSp0() throws Exception {
}

@Test
public void testRequireNoMissingBec() throws Exception {
void testRequireNoMissingBec() throws Exception {

var parser = new DefaultEquationNumberParser();

Expand All @@ -159,7 +159,7 @@ public void testRequireNoMissingBec() throws Exception {
}

@Test
public void testRequireNoUnexpectedBec() throws Exception {
void testRequireNoUnexpectedBec() throws Exception {

var parser = new DefaultEquationNumberParser();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> 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
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");

Expand All @@ -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");

Expand All @@ -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");

Expand All @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class HLNonprimaryCoefficientParserTest {

@Test
public void testParseSimple() throws Exception {
void testParseSimple() throws Exception {

var parser = new HLNonprimaryCoefficientParser();

Expand All @@ -38,7 +38,7 @@ public void testParseSimple() throws Exception {
}

@Test
public void testParseBadSpecies1() throws Exception {
void testParseBadSpecies1() throws Exception {

var parser = new HLNonprimaryCoefficientParser();

Expand All @@ -53,7 +53,7 @@ public void testParseBadSpecies1() throws Exception {
}

@Test
public void testParseBadSpecies2() throws Exception {
void testParseBadSpecies2() throws Exception {

var parser = new HLNonprimaryCoefficientParser();

Expand All @@ -68,7 +68,7 @@ public void testParseBadSpecies2() throws Exception {
}

@Test
public void testParseBadRegion() throws Exception {
void testParseBadRegion() throws Exception {

var parser = new HLNonprimaryCoefficientParser();

Expand All @@ -83,7 +83,7 @@ public void testParseBadRegion() throws Exception {
}

@Test
public void testParseMissingCoefficient() throws Exception {
void testParseMissingCoefficient() throws Exception {

var parser = new HLNonprimaryCoefficientParser();

Expand Down
Loading

0 comments on commit 1dd51fc

Please sign in to comment.