|
@@ -5,8 +5,10 @@
|
5
|
5
|
* Created on 19 April 2007, 17:33
|
6
|
6
|
*/
|
7
|
7
|
|
8
|
|
-package com.dmdirc.identities;
|
|
8
|
+package com.dmdirc.config;
|
9
|
9
|
|
|
10
|
+import com.dmdirc.config.ConfigTarget;
|
|
11
|
+import com.dmdirc.config.Identity;
|
10
|
12
|
import java.util.Properties;
|
11
|
13
|
import junit.framework.*;
|
12
|
14
|
|
|
@@ -40,7 +42,7 @@ public class IdentityTest extends TestCase {
|
40
|
42
|
|
41
|
43
|
assertEquals(props.getProperty("domain.option"), "value");
|
42
|
44
|
|
43
|
|
- myIdent.removeOption("domain", "option");
|
|
45
|
+ myIdent.unsetOption("domain", "option");
|
44
|
46
|
}
|
45
|
47
|
|
46
|
48
|
public void testGetName() {
|
|
@@ -57,8 +59,8 @@ public class IdentityTest extends TestCase {
|
57
|
59
|
|
58
|
60
|
assertTrue(myIdent.isProfile());
|
59
|
61
|
|
60
|
|
- myIdent.removeOption("profile", "nickname");
|
61
|
|
- myIdent.removeOption("profile", "realname");
|
|
62
|
+ myIdent.unsetOption("profile", "nickname");
|
|
63
|
+ myIdent.unsetOption("profile", "realname");
|
62
|
64
|
}
|
63
|
65
|
|
64
|
66
|
public void testHasOption() {
|
|
@@ -68,7 +70,7 @@ public class IdentityTest extends TestCase {
|
68
|
70
|
|
69
|
71
|
assertTrue(myIdent.hasOption("has", "option"));
|
70
|
72
|
|
71
|
|
- myIdent.removeOption("has", "option");
|
|
73
|
+ myIdent.unsetOption("has", "option");
|
72
|
74
|
}
|
73
|
75
|
|
74
|
76
|
public void testGetOption() {
|
|
@@ -77,7 +79,7 @@ public class IdentityTest extends TestCase {
|
77
|
79
|
|
78
|
80
|
assertEquals(props.getProperty("domain.option"), myIdent.getOption("domain", "option"));
|
79
|
81
|
|
80
|
|
- myIdent.removeOption("domain", "option");
|
|
82
|
+ myIdent.unsetOption("domain", "option");
|
81
|
83
|
}
|
82
|
84
|
|
83
|
85
|
public void testSetOption() {
|
|
@@ -87,7 +89,7 @@ public class IdentityTest extends TestCase {
|
87
|
89
|
|
88
|
90
|
assertEquals(count + 1, myIdent.getProperties().size());
|
89
|
91
|
|
90
|
|
- myIdent.removeOption("foo", "bar");
|
|
92
|
+ myIdent.unsetOption("foo", "bar");
|
91
|
93
|
}
|
92
|
94
|
|
93
|
95
|
public void testRemoveOption() {
|
|
@@ -95,7 +97,7 @@ public class IdentityTest extends TestCase {
|
95
|
97
|
final int count = props.size();
|
96
|
98
|
|
97
|
99
|
myIdent.setOption("foo", "bar", "baz");
|
98
|
|
- myIdent.removeOption("foo", "bar");
|
|
100
|
+ myIdent.unsetOption("foo", "bar");
|
99
|
101
|
|
100
|
102
|
assertEquals(count, props.size());
|
101
|
103
|
}
|
|
@@ -110,7 +112,7 @@ public class IdentityTest extends TestCase {
|
110
|
112
|
|
111
|
113
|
assertEquals("baz!", myIdent.getOption("foo", "bar"));
|
112
|
114
|
|
113
|
|
- myIdent.removeOption("foo", "bar");
|
|
115
|
+ myIdent.unsetOption("foo", "bar");
|
114
|
116
|
myIdent.save();
|
115
|
117
|
}
|
116
|
118
|
|