diff --git a/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java b/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java index 71d7e92b34a..2d7975d76ee 100644 --- a/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java +++ b/src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java @@ -253,8 +253,10 @@ void shouldSelectDiscriminatedPost() throws Exception { for (Map m : products) { if ("IMAGES".equals(m.get("SECTION"))) { assertNull(m.get("subject")); + assertNotNull(m.get("id")); } else { assertNotNull(m.get("subject")); + assertNull(m.get("id")); } } } finally { @@ -274,8 +276,10 @@ void shouldSelect2DiscriminatedPosts() throws Exception { for (Map m : products) { if ("IMAGES".equals(m.get("SECTION"))) { assertNull(m.get("subject")); + assertNotNull(m.get("id")); } else { assertNotNull(m.get("subject")); + assertNull(m.get("id")); } } } finally { diff --git a/src/test/java/org/apache/ibatis/executor/ExecutorTestHelper.java b/src/test/java/org/apache/ibatis/executor/ExecutorTestHelper.java index 0b5922e3c74..0c66474b6d4 100644 --- a/src/test/java/org/apache/ibatis/executor/ExecutorTestHelper.java +++ b/src/test/java/org/apache/ibatis/executor/ExecutorTestHelper.java @@ -305,7 +305,7 @@ static MappedStatement prepareSelectDiscriminatedPost(final Configuration config put("NEWS", discriminatorResultMap.getId()); put("VIDEOS", discriminatorResultMap.getId()); put("PODCASTS", discriminatorResultMap.getId()); - // NEWS left out on purpose. + // IMAGES left out on purpose. } }).build()).build());