|
@@ -23,13 +23,12 @@ package com.dmdirc.actions;
|
23
|
23
|
|
24
|
24
|
import com.dmdirc.config.prefs.PreferencesSetting;
|
25
|
25
|
import com.dmdirc.config.prefs.PreferencesType;
|
26
|
|
-import java.util.ArrayList;
|
27
|
26
|
import java.util.HashMap;
|
28
|
|
-import java.util.List;
|
29
|
27
|
import java.util.Map;
|
30
|
28
|
import org.junit.Ignore;
|
31
|
29
|
import org.junit.Test;
|
32
|
30
|
import static org.junit.Assert.*;
|
|
31
|
+import static org.mockito.Mockito.*;
|
33
|
32
|
|
34
|
33
|
public class ActionGroupTest {
|
35
|
34
|
|
|
@@ -62,15 +61,13 @@ public class ActionGroupTest {
|
62
|
61
|
assertEquals(expResult, result);
|
63
|
62
|
}
|
64
|
63
|
|
65
|
|
- @Test @Ignore
|
|
64
|
+ @Test
|
66
|
65
|
public void testGetSettings() {
|
67
|
66
|
ActionGroup instance = new ActionGroup("foo");
|
68
|
67
|
|
69
|
|
- Map<String, PreferencesSetting> expResult = new HashMap<String, PreferencesSetting>();
|
70
|
|
- Map<String, PreferencesSetting> result = instance.getSettings();
|
71
|
|
- assertEquals(expResult, result);
|
|
68
|
+ assertTrue(instance.getSettings().isEmpty());
|
72
|
69
|
|
73
|
|
- result.put("", new PreferencesSetting(PreferencesType.BOOLEAN, "", "", "", ""));
|
|
70
|
+ instance.getSettings().put("", mock(PreferencesSetting.class));
|
74
|
71
|
assertEquals(1, instance.getSettings().size());
|
75
|
72
|
}
|
76
|
73
|
|