Skip to content

Commit 434a300

Browse files
committed
Test code cleanup.
1 parent 8bbd765 commit 434a300

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/java/cz/cvut/kbss/jsonld/deserialization/expanded/ExpandedJsonLdDeserializerTest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
import static org.hamcrest.MatcherAssert.assertThat;
7272
import static org.hamcrest.Matchers.anyOf;
7373
import static org.hamcrest.Matchers.containsString;
74-
import static org.hamcrest.Matchers.hasItem;
7574
import static org.hamcrest.Matchers.hasItems;
7675
import static org.hamcrest.Matchers.instanceOf;
7776
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -346,7 +345,7 @@ void deserializationReturnsSubclassInstanceWhenTypesMatch() throws Exception {
346345
this.sut = JsonLdDeserializer.createExpandedDeserializer(config);
347346
final JsonArray input = readAndExpand("objectWithDataProperties.json");
348347
final Person result = sut.deserialize(input, Person.class);
349-
assertTrue(result instanceof User);
348+
assertInstanceOf(User.class, result);
350349
}
351350

352351
@Test
@@ -359,7 +358,7 @@ void deserializationSupportsPolymorphismForCollections() throws Exception {
359358
final PolymorphicOrganization result = sut.deserialize(input, PolymorphicOrganization.class);
360359
assertNotNull(result.employees);
361360
assertEquals(3, result.employees.size());
362-
result.employees.forEach(e -> assertTrue(e instanceof Employee));
361+
result.employees.forEach(e -> assertInstanceOf(Employee.class, e));
363362
}
364363

365364
@OWLClass(iri = Vocabulary.ORGANIZATION)

0 commit comments

Comments
 (0)