File tree Expand file tree Collapse file tree
src/test/java/com/imsweb/seerapi/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ dependencies {
4444
4545 testImplementation ' junit:junit:4.13.2'
4646 testImplementation ' org.assertj:assertj-core:3.23.1'
47+ testImplementation ' com.google.code.bean-matchers:bean-matchers:0.13'
4748}
4849
4950jar {
Original file line number Diff line number Diff line change 77import java .util .Collections ;
88import java .util .List ;
99
10+ import org .hamcrest .CoreMatchers ;
11+ import org .hamcrest .MatcherAssert ;
1012import org .junit .BeforeClass ;
1113import org .junit .Test ;
1214
1315import com .imsweb .seerapi .client .SeerApi ;
1416import com .imsweb .seerapi .client .publishable .PublishableSearch ;
1517
18+ import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
19+ import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
1620import static org .junit .Assert .assertEquals ;
1721import static org .junit .Assert .assertNotNull ;
1822import static org .junit .Assert .assertNull ;
@@ -274,4 +278,12 @@ public void testDiseaseChangelog() throws IOException {
274278 assertNull (entry .getNewVersion ());
275279 }
276280
281+ @ Test
282+ public void testBeans () {
283+ MatcherAssert .assertThat (DiseaseHistoryEvent .class , CoreMatchers .allOf (
284+ hasValidBeanConstructor (),
285+ hasValidGettersAndSetters ()
286+ ));
287+ }
288+
277289}
Original file line number Diff line number Diff line change 99import java .util .List ;
1010import java .util .Set ;
1111
12+ import org .hamcrest .CoreMatchers ;
13+ import org .hamcrest .MatcherAssert ;
1214import org .junit .BeforeClass ;
1315import org .junit .Test ;
1416
1517import com .imsweb .seerapi .client .SeerApi ;
1618import com .imsweb .seerapi .client .publishable .PublishableSearch ;
1719import com .imsweb .seerapi .client .shared .KeywordMatch ;
1820
21+ import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
22+ import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
1923import static com .imsweb .seerapi .client .glossary .Glossary .Category .GENERAL ;
2024import static org .junit .Assert .assertEquals ;
2125import static org .junit .Assert .assertNotNull ;
@@ -168,4 +172,11 @@ public void testGlossaryMatch() throws IOException {
168172 assertEquals (0 , matches .size ());
169173 }
170174
175+ @ Test
176+ public void testBeans () {
177+ MatcherAssert .assertThat (GlossaryHistoryEvent .class , CoreMatchers .allOf (
178+ hasValidBeanConstructor (),
179+ hasValidGettersAndSetters ()
180+ ));
181+ }
171182}
Original file line number Diff line number Diff line change 99import java .util .HashSet ;
1010import java .util .List ;
1111
12+ import org .hamcrest .CoreMatchers ;
13+ import org .hamcrest .MatcherAssert ;
1214import org .junit .BeforeClass ;
1315import org .junit .Test ;
1416
1517import com .imsweb .seerapi .client .SeerApi ;
1618import com .imsweb .seerapi .client .publishable .PublishableSearch ;
1719
20+ import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
21+ import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
1822import static org .junit .Assert .assertEquals ;
1923import static org .junit .Assert .assertNotNull ;
2024import static org .junit .Assert .assertNull ;
@@ -154,4 +158,12 @@ public void testRxSearchIterate() throws IOException {
154158 search .setOffset (search .getOffset () + results .getResults ().size ());
155159 }
156160 }
161+
162+ @ Test
163+ public void testBeans () {
164+ MatcherAssert .assertThat (RxHistoryEvent .class , CoreMatchers .allOf (
165+ hasValidBeanConstructor (),
166+ hasValidGettersAndSetters ()
167+ ));
168+ }
157169}
You can’t perform that action at this time.
0 commit comments