DATACOUCH-34 - Can't deserialize long/Long/Date fields.

Make the test more robust, check the set value against the returned value.
This commit is contained in:
David Harrigan
2013-10-10 08:29:23 +01:00
parent 6fd4d925fb
commit af5cfe894e

View File

@@ -201,10 +201,12 @@ public class CouchbaseTemplateTests {
@Test
public void shouldDeserialiseLongs() {
SimpleWithLong simpleWithLong = new SimpleWithLong("simpleWithLong:simple", new Date().getTime());
final long time = new Date().getTime();
SimpleWithLong simpleWithLong = new SimpleWithLong("simpleWithLong:simple", time);
template.save(simpleWithLong);
simpleWithLong = template.findById("simpleWithLong:simple", SimpleWithLong.class);
assertNotNull(simpleWithLong);
assertEquals(time, simpleWithLong.getValue());
}
/**