|
@@ -23,6 +23,7 @@
|
23
|
23
|
package com.dmdirc.addons.ui_swing.dialogs.actionsmanager;
|
24
|
24
|
|
25
|
25
|
import com.dmdirc.actions.ActionGroup;
|
|
26
|
+import com.dmdirc.updater.Version;
|
26
|
27
|
import org.junit.Test;
|
27
|
28
|
import org.uispec4j.Panel;
|
28
|
29
|
import org.uispec4j.UISpecTestCase;
|
|
@@ -53,7 +54,7 @@ public class ActionGroupInformationPanelTest extends UISpecTestCase {
|
53
|
54
|
public void testAllLabels() {
|
54
|
55
|
final ActionGroup group = mock(ActionGroup.class);
|
55
|
56
|
when(group.getDescription()).thenReturn("description");
|
56
|
|
- when(group.getVersion()).thenReturn(17);
|
|
57
|
+ when(group.getVersion()).thenReturn(new Version(17));
|
57
|
58
|
when(group.getAuthor()).thenReturn("foo <bar@baz>");
|
58
|
59
|
|
59
|
60
|
final Panel panel = new Panel(new ActionGroupInformationPanel(group));
|
|
@@ -71,7 +72,7 @@ public class ActionGroupInformationPanelTest extends UISpecTestCase {
|
71
|
72
|
public void testNoAuthor() {
|
72
|
73
|
final ActionGroup group = mock(ActionGroup.class);
|
73
|
74
|
when(group.getDescription()).thenReturn("description");
|
74
|
|
- when(group.getVersion()).thenReturn(17);
|
|
75
|
+ when(group.getVersion()).thenReturn(new Version(17));
|
75
|
76
|
|
76
|
77
|
final Panel panel = new Panel(new ActionGroupInformationPanel(group));
|
77
|
78
|
|
|
@@ -86,7 +87,7 @@ public class ActionGroupInformationPanelTest extends UISpecTestCase {
|
86
|
87
|
public void testNoVersion() {
|
87
|
88
|
final ActionGroup group = mock(ActionGroup.class);
|
88
|
89
|
when(group.getDescription()).thenReturn("description");
|
89
|
|
- when(group.getVersion()).thenReturn(-1);
|
|
90
|
+ when(group.getVersion()).thenReturn(null);
|
90
|
91
|
when(group.getAuthor()).thenReturn("foo <bar@baz>");
|
91
|
92
|
|
92
|
93
|
final Panel panel = new Panel(new ActionGroupInformationPanel(group));
|