@@ -76,6 +76,20 @@ public void testIsDeLFTRedirectOutputTrueIfSet() throws IOException {
7676 assertTrue (GrobidProperties .isDeLFTRedirectOutput ());
7777 }
7878
79+ @ Test
80+ public void testShouldReturnEmptyTrainModuleByDefault () {
81+ GrobidProperties .getProps ().remove (GrobidPropertyKeys .PROP_GROBID_DELFT_TRAIN_MODULE );
82+ assertEquals (GrobidProperties .getDeLFTTrainModule (), "" );
83+ }
84+
85+ @ Test
86+ public void testShouldReturnConfiguredModule () {
87+ GrobidProperties .getProps ().put (
88+ GrobidPropertyKeys .PROP_GROBID_DELFT_TRAIN_MODULE , "module1"
89+ );
90+ assertEquals (GrobidProperties .getDeLFTTrainModule (), "module1" );
91+ }
92+
7993 @ Test
8094 public void testShouldReturnEmptyTrainArgsByDefault () {
8195 GrobidProperties .getProps ().remove (GrobidPropertyKeys .PROP_GROBID_DELFT_TRAIN_ARGS );
@@ -88,21 +102,20 @@ public void testShouldReturnConfiguredTrainArgs() {
88102 assertEquals (GrobidProperties .getDeLFTTrainArgs (), "args" );
89103 }
90104
105+ /*@Test(expected = GrobidPropertyException.class)
91106 @Test
92- public void testShouldReturnEmptyTrainModuleByDefault () {
93- GrobidProperties .getProps ().remove (GrobidPropertyKeys .PROP_GROBID_DELFT_TRAIN_MODULE );
94- assertEquals (GrobidProperties .getDeLFTTrainModule (), "" );
107+ public void testShouldReturnEmptyTrainArgsByDefault () {
108+ GrobidProperties.getProps().remove(GrobidPropertyKeys.PROP_GROBID_DELFT_TRAIN_ARGS );
109+ assertEquals(GrobidProperties.getDeLFTTrainArgs (), "");
95110 }
96111
97112 @Test
98- public void testShouldReturnConfiguredModule () {
99- GrobidProperties .getProps ().put (
100- GrobidPropertyKeys .PROP_GROBID_DELFT_TRAIN_MODULE , "module1"
101- );
102- assertEquals (GrobidProperties .getDeLFTTrainModule (), "module1" );
113+ public void testShouldReturnConfiguredTrainArgs() {
114+ GrobidProperties.getProps().put(GrobidPropertyKeys.PROP_GROBID_DELFT_TRAIN_ARGS, "args");
115+ assertEquals(GrobidProperties.getDeLFTTrainArgs(), "args");
103116 }
104117
105- /* @Test(expected = GrobidPropertyException.class)
118+ @Test(expected = GrobidPropertyException.class)
106119 public void testCheckPropertiesException_shouldThrowException() {
107120 GrobidProperties.getProps().put(
108121 GrobidPropertyKeys.PROP_3RD_PARTY_PDFTOXML, "");
0 commit comments