From 3899aca062cf23186d8d1c7955720aa29aa1bec6 Mon Sep 17 00:00:00 2001 From: alicedraillard Date: Thu, 5 Dec 2024 17:51:45 +0100 Subject: [PATCH] wip2 --- .../cgi/magneto/helper/IModelHelperTest.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/test/java/fr/cgi/magneto/helper/IModelHelperTest.java b/src/test/java/fr/cgi/magneto/helper/IModelHelperTest.java index e25392efa..1303e598e 100644 --- a/src/test/java/fr/cgi/magneto/helper/IModelHelperTest.java +++ b/src/test/java/fr/cgi/magneto/helper/IModelHelperTest.java @@ -104,25 +104,4 @@ public void testSubClassIModel(TestContext ctx) { ctx.assertTrue(invalidModel.isEmpty(), "One or more IModel don't have public constructor with JsonObject parameter declared. Check log above."); } - - @Test - public void testLinkedMap(TestContext ctx) { - LinkedHashMap linkedHashMap = new LinkedHashMap<>(); - LinkedHashMap linkedHashMap2 = new LinkedHashMap<>(); - LinkedHashMap linkedHashMap3 = new LinkedHashMap<>(); - LinkedHashMap linkedHashMap4 = new LinkedHashMap<>(); - linkedHashMap.put("my_name", "name1"); - linkedHashMap2.put("my_name", "name2"); - //Is instance is not a MyOtherIModel, so it will not be added to the list - linkedHashMap3.put("my_name", new MyClass()); - linkedHashMap4.put(3, "name3"); - - List list = ModelHelper.toList(new JsonArray(Arrays.asList(linkedHashMap, linkedHashMap2, linkedHashMap3, - linkedHashMap4)), MyOtherIModel.class); - - ctx.assertEquals(list.size(), 4); - ctx.assertEquals(list.get(0).myName, "name1"); - ctx.assertEquals(list.get(1).myName, "name2"); - ctx.assertEquals(list.get(2).myName, null); - } }