Explorar el Código

Fix broken unit tests


git-svn-id: http://svn.dmdirc.com/trunk@4829 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6.3m1rc1
Chris Smith hace 15 años
padre
commit
aa46720195

+ 2
- 3
test/com/dmdirc/config/IdentityTest.java Ver fichero

@@ -136,13 +136,12 @@ public class IdentityTest {
136 136
     }
137 137
 
138 138
     @Test
139
-    public void testSave() {
139
+    public void testSave() throws IOException, InvalidIdentityFileException {
140 140
         myIdent.setOption("foo", "bar", "baz!");
141 141
         
142 142
         myIdent.save();
143
-        myIdent = null;
144 143
         
145
-        myIdent = Identity.buildIdentity(target);
144
+        myIdent = new Identity(myIdent.getFile().getFile(), false);
146 145
         
147 146
         assertEquals("baz!", myIdent.getOption("foo", "bar"));
148 147
         

+ 9
- 2
test/com/dmdirc/config/identity1 Ver fichero

@@ -1,2 +1,9 @@
1
-identity.foo=bar
2
-meep.moop=2
1
+keysections:
2
+  identity
3
+  meep
4
+
5
+identity:
6
+  foo = bar
7
+
8
+meep:
9
+  moop=2

+ 9
- 2
test/com/dmdirc/config/identity2 Ver fichero

@@ -1,2 +1,9 @@
1
-identity.name=unit test
2
-meep.moop=2
1
+keysections:
2
+  identity
3
+  meep
4
+
5
+identity:
6
+  name=unit test
7
+
8
+meep:
9
+  moop=2

+ 13
- 4
test/com/dmdirc/config/identity3 Ver fichero

@@ -1,5 +1,14 @@
1
-identity.name=unit test
2
-identity.ircd=DMDircircd!
1
+keysections:
2
+  identity
3
+  meep
4
+  unit
3 5
 
4
-meep.moop=2
5
-unit.test=true
6
+identity:
7
+  name=unit test
8
+  ircd=DMDircircd!
9
+
10
+meep:
11
+  moop=2
12
+
13
+unit:
14
+  test=true

Loading…
Cancelar
Guardar