Skip to content

Commit 29cd46d

Browse files
committed
More cleanup
1 parent 3bd50e1 commit 29cd46d

9 files changed

Lines changed: 47 additions & 41 deletions

File tree

src/main/java/com/imsweb/seerapi/client/staging/cs/CsStagingData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public void setSsf(Integer id, String ssf) {
211211
*/
212212
public static class CsStagingInputBuilder {
213213

214-
private CsStagingData _data;
214+
private final CsStagingData _data;
215215

216216
public CsStagingInputBuilder() {
217217
_data = new CsStagingData();

src/main/java/com/imsweb/seerapi/client/staging/eod/EodStagingData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public String toString() {
159159
*/
160160
public static class EodStagingInputBuilder {
161161

162-
private EodStagingData _data;
162+
private final EodStagingData _data;
163163

164164
public EodStagingInputBuilder() {
165165
_data = new EodStagingData();

src/main/java/com/imsweb/seerapi/client/staging/tnm/TnmStagingData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public void setSsf(Integer id, String ssf) {
180180
*/
181181
public static class TnmStagingInputBuilder {
182182

183-
private TnmStagingData _data;
183+
private final TnmStagingData _data;
184184

185185
public TnmStagingInputBuilder() {
186186
_data = new TnmStagingData();

src/test/java/com/imsweb/seerapi/client/Range.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ public class Range {
1212
@JsonProperty("high")
1313
protected String _highValue;
1414

15-
public Range() {
16-
}
17-
1815
public Range(String low, String high) {
1916
setLowValue(low);
2017
setHighValue(high);

src/test/java/com/imsweb/seerapi/client/glossary/GlossaryTest.java

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.List;
1010
import java.util.Set;
1111

12-
import org.junit.Assert;
1312
import org.junit.BeforeClass;
1413
import org.junit.Test;
1514

@@ -21,6 +20,7 @@
2120
import static org.junit.Assert.assertEquals;
2221
import static org.junit.Assert.assertNotNull;
2322
import static org.junit.Assert.assertNull;
23+
import static org.junit.Assert.assertTrue;
2424

2525
public class GlossaryTest {
2626

@@ -33,13 +33,14 @@ public static void setup() {
3333

3434
@Test
3535
public void testGlossaryCategory() {
36-
Assert.assertEquals(Glossary.Category.SOLID_TUMOR, Glossary.Category.valueOf("SOLID_TUMOR"));
36+
assertEquals(Glossary.Category.SOLID_TUMOR, Glossary.Category.valueOf("SOLID_TUMOR"));
3737
}
3838

3939
@Test
4040
public void testGlossaryVersions() throws IOException {
4141
List<GlossaryVersion> versions = _GLOSSARY.versions().execute().body();
4242

43+
assertNotNull(versions);
4344
assertEquals(1, versions.size());
4445
GlossaryVersion version = versions.get(0);
4546
assertEquals("latest", version.getName());
@@ -51,26 +52,27 @@ public void testGlossaryVersions() throws IOException {
5152
@Test
5253
public void testGlossaryById() throws IOException {
5354
GlossarySearchResults results = _GLOSSARY.search("latest", "Lymphangiogram").execute().body();
54-
Assert.assertTrue(results.getCount() > 0);
55+
assertNotNull(results);
56+
assertTrue(results.getCount() > 0);
5557

5658
Glossary glossary = _GLOSSARY.getById("latest", results.getResults().get(0).getId()).execute().body();
5759

58-
Assert.assertNotNull(glossary);
59-
Assert.assertEquals("Lymphangiogram", glossary.getName());
60-
Assert.assertEquals(Collections.singletonList(GENERAL), glossary.getCategories());
61-
Assert.assertNull(glossary.getPrimarySite());
60+
assertNotNull(glossary);
61+
assertEquals("Lymphangiogram", glossary.getName());
62+
assertEquals(Collections.singletonList(GENERAL), glossary.getCategories());
63+
assertNull(glossary.getPrimarySite());
6264

63-
Assert.assertNull(glossary.getHistology());
64-
Assert.assertTrue(glossary.getDefinition().startsWith("An x-ray of the lymphatic system."));
65-
Assert.assertNull(glossary.getAlternateName());
66-
Assert.assertNull(glossary.getHistory());
65+
assertNull(glossary.getHistology());
66+
assertTrue(glossary.getDefinition().startsWith("An x-ray of the lymphatic system."));
67+
assertNull(glossary.getAlternateName());
68+
assertNull(glossary.getHistory());
6769
}
6870

6971
@Test
7072
public void testGlossaryChangelog() throws IOException {
7173
GlossaryChangelogResults results = _GLOSSARY.changelogs("latest", null, null, 1).execute().body();
7274

73-
Assert.assertNotNull(results);
75+
assertNotNull(results);
7476

7577
// TODO since all the glossary items were removed from the production database, this needs to be commented out; it will return when they are published again
7678

@@ -104,28 +106,28 @@ public void testGlossarySearch() throws IOException {
104106

105107
GlossarySearchResults results = _GLOSSARY.search("latest", search.paramMap()).execute().body();
106108

107-
Assert.assertNotNull(results);
108-
Assert.assertEquals(25, results.getCount().longValue());
109-
Assert.assertTrue(results.getTotal().longValue() > 0);
110-
Assert.assertTrue(results.getResults().size() > 0);
111-
Assert.assertEquals(Collections.singletonList(term), results.getTerms());
109+
assertNotNull(results);
110+
assertEquals(25, results.getCount().longValue());
111+
assertTrue(results.getTotal().longValue() > 0);
112+
assertTrue(results.getResults().size() > 0);
113+
assertEquals(Collections.singletonList(term), results.getTerms());
112114

113115
// add the category and verify there are no results
114116
results = _GLOSSARY.search("latest", search.paramMap(), EnumSet.of(Glossary.Category.SOLID_TUMOR)).execute().body();
115117

116-
Assert.assertNotNull(results);
117-
Assert.assertEquals(25, results.getCount().longValue());
118-
Assert.assertEquals(0, results.getTotal().longValue());
119-
Assert.assertNull(results.getResults());
118+
assertNotNull(results);
119+
assertEquals(25, results.getCount().longValue());
120+
assertEquals(0, results.getTotal().longValue());
121+
assertNull(results.getResults());
120122

121123
// add a second category and verify there are we get the results again
122124
results = _GLOSSARY.search("latest", search.paramMap(), EnumSet.of(Glossary.Category.SOLID_TUMOR, Glossary.Category.HEMATO)).execute().body();
123125

124-
Assert.assertNotNull(results);
125-
Assert.assertEquals(25, results.getCount().longValue());
126-
Assert.assertTrue(results.getTotal().longValue() > 0);
127-
Assert.assertTrue(results.getResults().size() > 0);
128-
Assert.assertEquals(Collections.singletonList(term), results.getTerms());
126+
assertNotNull(results);
127+
assertEquals(25, results.getCount().longValue());
128+
assertTrue(results.getTotal().longValue() > 0);
129+
assertTrue(results.getResults().size() > 0);
130+
assertEquals(Collections.singletonList(term), results.getTerms());
129131
}
130132

131133
@Test
@@ -139,9 +141,9 @@ public void testGlossarySearchIterate() throws IOException {
139141

140142
while (total == null || search.getOffset() < total) {
141143
GlossarySearchResults results = _GLOSSARY.search("latest", search.paramMap(), EnumSet.of(Glossary.Category.HEMATO)).execute().body();
142-
Assert.assertNotNull(results);
143-
Assert.assertTrue(results.getTotal() > 0);
144-
Assert.assertTrue(results.getResults().size() > 0);
144+
assertNotNull(results);
145+
assertTrue(results.getTotal() > 0);
146+
assertTrue(results.getResults().size() > 0);
145147

146148
// the first time through, set the total
147149
if (total == null)
@@ -150,20 +152,20 @@ public void testGlossarySearchIterate() throws IOException {
150152
search.setOffset(search.getOffset() + results.getResults().size());
151153
}
152154

153-
Assert.assertTrue(total > 100);
155+
assertTrue(total > 100);
154156
}
155157

156158
@Test
157159
public void testGlossaryMatch() throws IOException {
158160
String text = "This text contains summary stage which should be found.";
159161

160162
Set<KeywordMatch> matches = _GLOSSARY.match(text, null, true).execute().body();
161-
Assert.assertNotNull(matches);
162-
Assert.assertEquals(1, matches.size());
163+
assertNotNull(matches);
164+
assertEquals(1, matches.size());
163165

164166
matches = _GLOSSARY.match(text, EnumSet.of(GENERAL), true).execute().body();
165-
Assert.assertNotNull(matches);
166-
Assert.assertEquals(0, matches.size());
167+
assertNotNull(matches);
168+
assertEquals(0, matches.size());
167169
}
168170

169171
}

src/test/java/com/imsweb/seerapi/client/mph/MphTest.java renamed to src/test/java/com/imsweb/seerapi/client/hcpcs/mph/MphTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.imsweb.seerapi.client.mph;
1+
package com.imsweb.seerapi.client.hcpcs.mph;
22

33
import java.io.IOException;
44

@@ -7,6 +7,10 @@
77

88
import com.imsweb.seerapi.client.BadRequestException;
99
import com.imsweb.seerapi.client.SeerApi;
10+
import com.imsweb.seerapi.client.mph.MphInput;
11+
import com.imsweb.seerapi.client.mph.MphInputPair;
12+
import com.imsweb.seerapi.client.mph.MphOutput;
13+
import com.imsweb.seerapi.client.mph.MphService;
1014

1115
import static org.junit.Assert.assertEquals;
1216
import static org.junit.Assert.assertTrue;

src/test/java/com/imsweb/seerapi/client/rx/RxTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public static void setup() {
3333
public void testRxVersions() throws IOException {
3434
List<RxVersion> versions = _RX.versions().execute().body();
3535

36+
assertNotNull(versions);
3637
assertEquals(1, versions.size());
3738
RxVersion version = versions.get(0);
3839
assertEquals("latest", version.getName());

src/test/java/com/imsweb/seerapi/client/siterecode/SiteRecodeTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public void testSiteRecode() throws IOException {
6262
Call<SiteRecode> call = _SITE_RECODE.siteGroup("C379", "9650");
6363
SiteRecode recode = call.execute().body();
6464

65+
assertNotNull(recode);
6566
assertEquals("C379", recode.getSite());
6667
assertEquals("9650", recode.getHist());
6768
assertEquals("33011", recode.getSiteGroup());

src/test/java/com/imsweb/seerapi/client/surgery/SurgeryTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public void testSiteSpecificSurgeryTable() throws IOException {
4848
assertThat(row.getLineBreak()).isFalse();
4949

5050
table = _SURGERY.table("2014", null, "C001", "8000").execute().body();
51+
assertThat(table).isNotNull();
5152
assertThat(table.getTitle()).isEqualTo("Oral Cavity");
5253
}
5354
}

0 commit comments

Comments
 (0)