From 5a3d6a0c518ebf57910fa677c0d986db590b3118 Mon Sep 17 00:00:00 2001 From: josephine-barboza Date: Sun, 14 Apr 2019 22:56:48 +0530 Subject: [PATCH] BAEL-2766 Added more asserts to add items to map --- core-groovy/src/test/groovy/com/baeldung/map/MapTest.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core-groovy/src/test/groovy/com/baeldung/map/MapTest.groovy b/core-groovy/src/test/groovy/com/baeldung/map/MapTest.groovy index 8bd9302412..f1d528207f 100644 --- a/core-groovy/src/test/groovy/com/baeldung/map/MapTest.groovy +++ b/core-groovy/src/test/groovy/com/baeldung/map/MapTest.groovy @@ -31,7 +31,9 @@ class MapTest{ map.putAll(hobbyMap) assertTrue(map == [name:"Jerry", age: 42, city: "New York", hobby:"Singing"]) - + assertTrue(hobbyMap.hobby == "Singing") + assertTrue(hobbyMap[hobbyLiteral] == "Singing") + map.plus([1:20]) // returns new map map << [2:30] @@ -143,4 +145,4 @@ class MapTest{ } -} \ No newline at end of file +}