@@ -49,11 +49,11 @@ public void setUp() throws Exception {
49
49
public void getString () throws Exception {
50
50
Assert .assertEquals ("stringVal1" , spUtils1 .getString ("stringKey1" ));
51
51
Assert .assertEquals ("stringVal" , spUtils1 .getString ("stringKey" , "stringVal" ));
52
- Assert .assertNull ( spUtils1 .getString ("stringKey" ));
52
+ Assert .assertEquals ( "" , spUtils1 .getString ("stringKey" ));
53
53
54
54
Assert .assertEquals ("stringVal2" , spUtils2 .getString ("stringKey2" ));
55
55
Assert .assertEquals ("stringVal" , spUtils2 .getString ("stringKey" , "stringVal" ));
56
- Assert .assertNull ( spUtils2 .getString ("stringKey" ));
56
+ Assert .assertEquals ( "" , spUtils2 .getString ("stringKey" ));
57
57
}
58
58
59
59
@ Test
@@ -122,11 +122,11 @@ public void getAll() throws Exception {
122
122
public void testRemove () throws Exception {
123
123
Assert .assertEquals ("stringVal1" , spUtils1 .getString ("stringKey1" ));
124
124
spUtils1 .remove ("stringKey1" );
125
- Assert .assertNull ( spUtils1 .getString ("stringKey1" ));
125
+ Assert .assertEquals ( "" , spUtils1 .getString ("stringKey1" ));
126
126
127
127
Assert .assertEquals ("stringVal2" , spUtils2 .getString ("stringKey2" ));
128
128
spUtils2 .remove ("stringKey2" );
129
- Assert .assertNull ( spUtils2 .getString ("stringKey2" ));
129
+ Assert .assertEquals ( "" , spUtils2 .getString ("stringKey2" ));
130
130
}
131
131
132
132
@ Test
@@ -141,14 +141,14 @@ public void testContains() throws Exception {
141
141
@ Test
142
142
public void clear () throws Exception {
143
143
spUtils1 .clear ();
144
- Assert .assertNull ( spUtils1 .getString ("stringKey1" ));
144
+ Assert .assertEquals ( "" , spUtils1 .getString ("stringKey1" ));
145
145
Assert .assertEquals (-1 , spUtils1 .getInt ("intKey1" ));
146
146
Assert .assertEquals (-1L , spUtils1 .getLong ("longKey1" ));
147
147
Assert .assertEquals (-1f , spUtils1 .getFloat ("floatKey1" ), 0f );
148
148
Assert .assertFalse (spUtils1 .getBoolean ("booleanKey1" ));
149
149
150
150
spUtils2 .clear ();
151
- Assert .assertNull ( spUtils2 .getString ("stringKey2" ));
151
+ Assert .assertEquals ( "" , spUtils2 .getString ("stringKey2" ));
152
152
Assert .assertEquals (-1 , spUtils2 .getInt ("intKey2" ));
153
153
Assert .assertEquals (-1L , spUtils2 .getLong ("longKey1" ));
154
154
Assert .assertEquals (-1f , spUtils2 .getFloat ("floatKey1" ), 0f );
0 commit comments