From 0478d4600794329e08b22a67c07daca5dad9404b Mon Sep 17 00:00:00 2001 From: David Calap Date: Wed, 2 Oct 2019 09:22:55 +0200 Subject: [PATCH] BAEL-3323 new check added to example --- .../src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt b/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt index 1e7136d08b..6fa7983689 100644 --- a/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt +++ b/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt @@ -2,6 +2,7 @@ package com.baeldung.lists import org.junit.jupiter.api.Test import kotlin.test.assertEquals +import kotlin.test.assertFalse import kotlin.test.assertTrue class ListsUnitTest { @@ -26,7 +27,8 @@ class ListsUnitTest { fun whenFilterNotWithPredicate_thenMatchingItemsAreReturned() { //Returns a list containing only elements not matching the given predicate. val theMehBatmans = batmans.filterNot { actor -> actor.contains("a") } - assertTrue(!theMehBatmans.contains("Christian Bale") && !theMehBatmans.contains("Michael Keaton")) + assertFalse(theMehBatmans.contains("Christian Bale") && theMehBatmans.contains("Michael Keaton")) + assertTrue(theMehBatmans.contains("Ben Affleck") && theMehBatmans.contains("George Clooney")) } } \ No newline at end of file