|
@@ -48,6 +48,7 @@ public class IdentityTest {
|
48
|
48
|
|
49
|
49
|
@After
|
50
|
50
|
public void tearDown() throws Exception {
|
|
51
|
+ myIdent.file.delete();
|
51
|
52
|
myIdent = null;
|
52
|
53
|
}
|
53
|
54
|
|
|
@@ -142,12 +143,9 @@ public class IdentityTest {
|
142
|
143
|
|
143
|
144
|
myIdent.save();
|
144
|
145
|
|
145
|
|
- myIdent = new Identity(myIdent.getFile().getFile(), false);
|
|
146
|
+ myIdent = new Identity(myIdent.file.getFile(), false);
|
146
|
147
|
|
147
|
148
|
assertEquals("baz!", myIdent.getOption("foo", "bar"));
|
148
|
|
-
|
149
|
|
- myIdent.unsetOption("foo", "bar");
|
150
|
|
- myIdent.save();
|
151
|
149
|
}
|
152
|
150
|
|
153
|
151
|
@Test
|
|
@@ -170,13 +168,13 @@ public class IdentityTest {
|
170
|
168
|
public void testMigrate() throws IOException, InvalidIdentityFileException {
|
171
|
169
|
final Identity id = new Identity(getClass().getResourceAsStream("identity3"), false);
|
172
|
170
|
|
173
|
|
- assertTrue(id.getFile().isKeyDomain("identity"));
|
174
|
|
- assertTrue(id.getFile().isKeyDomain("meep"));
|
175
|
|
- assertTrue(id.getFile().isKeyDomain("unit"));
|
|
171
|
+ assertTrue(id.file.isKeyDomain("identity"));
|
|
172
|
+ assertTrue(id.file.isKeyDomain("meep"));
|
|
173
|
+ assertTrue(id.file.isKeyDomain("unit"));
|
176
|
174
|
|
177
|
|
- assertEquals("unit test", id.getFile().getKeyDomain("identity").get("name"));
|
178
|
|
- assertEquals("true", id.getFile().getKeyDomain("unit").get("test"));
|
179
|
|
- assertEquals("2", id.getFile().getKeyDomain("meep").get("moop"));
|
|
175
|
+ assertEquals("unit test", id.file.getKeyDomain("identity").get("name"));
|
|
176
|
+ assertEquals("true", id.file.getKeyDomain("unit").get("test"));
|
|
177
|
+ assertEquals("2", id.file.getKeyDomain("meep").get("moop"));
|
180
|
178
|
}
|
181
|
179
|
|
182
|
180
|
@Test
|