diff --git a/jodd-vtor/src/test/java/jodd/vtor/VtorTest.java b/jodd-vtor/src/test/java/jodd/vtor/VtorTest.java index c29a2ad12..48f673654 100644 --- a/jodd-vtor/src/test/java/jodd/vtor/VtorTest.java +++ b/jodd-vtor/src/test/java/jodd/vtor/VtorTest.java @@ -116,7 +116,7 @@ public void testUseProfile_withTwoDifferentValues() throws Exception { Vtor vtor = new Vtor(); vtor.useProfile("testProfile"); assertEquals("size of list with profiles must be 1 when add one profile", vtor.enabledProfiles.size(), 1); - assertEquals("first element of enabled profiles must be testProfile when use testProfile", vtor.enabledProfiles.iterator().next(), "testProfile"); + assertTrue("first element of enabled profiles must be testProfile when use testProfile", new ArrayList(vtor.enabledProfiles).contains("testProfile")); //when vtor.useProfile(null); @@ -128,20 +128,19 @@ public void testUseProfile_withTwoDifferentValues() throws Exception { @Test public void testUseProfiles_withNullValue() throws Exception { Vtor vtor = new Vtor(); - vtor.useProfiles((String) null); + vtor.useProfiles(null); assertNull("list of enabled profiles must be null when add only null profile", vtor.enabledProfiles); } @Test - @Ignore public void testUseProfiles_withTwoDifferentValues() throws Exception { //given Vtor vtor = new Vtor(); vtor.useProfiles("testProfile1", "testProfile2"); assertEquals("size of list with profiles must be 2 when add two profile", vtor.enabledProfiles.size(), 2); - Iterator resultIterator = vtor.enabledProfiles.iterator(); - assertEquals("first element must be equal to first added profile", resultIterator.next(), "testProfile1"); - assertEquals("second element must be equal to second added profile", resultIterator.next(), "testProfile2"); + ArrayList enabledProfileList = new ArrayList(vtor.enabledProfiles); + assertTrue("first element must be equal to first added profile", enabledProfileList.contains("testProfile1")); + assertTrue("second element must be equal to second added profile", enabledProfileList.contains("testProfile2")); //when vtor.useProfile(null);