Browse Source

Renamed identities tests

git-svn-id: http://svn.dmdirc.com/trunk@1683 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Gregory Holmes 17 years ago
parent
commit
be20a2faaa
2 changed files with 12 additions and 11 deletions
  1. 1
    2
      test/com/dmdirc/ServerManagerTest.java
  2. 11
    9
      test/com/dmdirc/config/IdentityTest.java

+ 1
- 2
test/com/dmdirc/ServerManagerTest.java View File

@@ -7,8 +7,7 @@
7 7
 
8 8
 package com.dmdirc;
9 9
 
10
-import com.dmdirc.identities.IdentityManager;
11
-import javax.swing.JInternalFrame;
10
+import com.dmdirc.config.IdentityManager;
12 11
 import org.junit.AfterClass;
13 12
 import org.junit.Before;
14 13
 import org.junit.BeforeClass;

test/com/dmdirc/identities/IdentityTest.java → test/com/dmdirc/config/IdentityTest.java View File

@@ -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
 

Loading…
Cancel
Save