usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [5/9] git commit: Fixing tests so that they properly check obj serialization.
Date Wed, 19 Mar 2014 01:20:52 GMT
Fixing tests so that they properly check obj serialization.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/b6304a51
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/b6304a51
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/b6304a51

Branch: refs/heads/asyncqueue
Commit: b6304a516b7bb9e93eacf0e4475f5f055364f312
Parents: 6979ae6
Author: grey <greyes@apigee.com>
Authored: Mon Mar 17 18:14:43 2014 -0700
Committer: grey <greyes@apigee.com>
Committed: Mon Mar 17 18:14:43 2014 -0700

----------------------------------------------------------------------
 ...MvccEntitySerializationStrategyImplTest.java | 57 ++++++++++----------
 1 file changed, 28 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b6304a51/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 5375ead..f8a51b3 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -52,7 +52,6 @@ import static junit.framework.TestCase.assertEquals;
 import static junit.framework.TestCase.assertFalse;
 import static junit.framework.TestCase.assertNotNull;
 import static junit.framework.TestCase.assertNull;
-import static junit.framework.TestCase.assertSame;
 import static junit.framework.TestCase.assertTrue;
 import static org.mockito.Mockito.mock;
 
@@ -160,36 +159,36 @@ public class MvccEntitySerializationStrategyImplTest {
         assertEquals( "Mvcc entities are the same", saved, returned );
 
 
-        assertEquals( id, entity.getId() );
+        assertEquals( id, returned.getId() );
 
 
-        Field<Boolean> boolFieldReturned = entity.getField( boolField.getName() );
+        Field<Boolean> boolFieldReturned = returned.getEntity().get().getField( boolField.getName()
);
 
-        assertSame( boolField, boolFieldReturned );
+        assertEquals( boolField, boolFieldReturned );
 
-        Field<Double> doubleFieldReturned = entity.getField( doubleField.getName()
);
+        Field<Double> doubleFieldReturned = returned.getEntity().get().getField( doubleField.getName()
);
 
-        assertSame( doubleField, doubleFieldReturned );
+        assertEquals( doubleField, doubleFieldReturned );
 
-        Field<Integer> intFieldReturned = entity.getField( intField.getName() );
+        Field<Integer> intFieldReturned = returned.getEntity().get().getField( intField.getName()
);
 
-        assertSame( intField, intFieldReturned );
+        assertEquals( intField, intFieldReturned );
 
-        Field<Long> longFieldReturned = entity.getField( longField.getName() );
+        Field<Long> longFieldReturned = returned.getEntity().get().getField( longField.getName()
);
 
-        assertSame( longField, longFieldReturned );
+        assertEquals( longField, longFieldReturned );
 
-        Field<String> stringFieldReturned = entity.getField( stringField.getName()
);
+        Field<String> stringFieldReturned = returned.getEntity().get().getField( stringField.getName()
);
 
-        assertSame( stringField, stringFieldReturned );
+        assertEquals( stringField, stringFieldReturned );
 
-        Field<UUID> uuidFieldReturned = entity.getField( uuidField.getName() );
+        Field<UUID> uuidFieldReturned = returned.getEntity().get().getField( uuidField.getName()
);
 
-        assertSame( uuidField, uuidFieldReturned );
+        assertEquals( uuidField, uuidFieldReturned );
 
 
         Set<Field> results = new HashSet<Field>();
-        results.addAll( entity.getFields() );
+        results.addAll( returned.getEntity().get().getFields());
 
 
         assertTrue( results.contains( boolField ) );
@@ -435,36 +434,36 @@ public class MvccEntitySerializationStrategyImplTest {
         assertEquals( "Mvcc entities are the same", saved, returned );
 
 
-        assertEquals( id, entity.getId() );
+        assertEquals( id, returned.getId() );
 
 
-        Field<Boolean> boolFieldReturned = entity.getField( boolField.getName() );
+        Field<Boolean> boolFieldReturned = returned.getEntity().get().getField( boolField.getName()
);
 
-        assertSame( boolField, boolFieldReturned );
+        assertEquals( boolField, boolFieldReturned );
 
-        Field<Double> doubleFieldReturned = entity.getField( doubleField.getName()
);
+        Field<Double> doubleFieldReturned = returned.getEntity().get().getField( doubleField.getName()
);
 
-        assertSame( doubleField, doubleFieldReturned );
+        assertEquals( doubleField, doubleFieldReturned );
 
-        Field<Integer> intFieldReturned = entity.getField( intField.getName() );
+        Field<Integer> intFieldReturned = returned.getEntity().get().getField( intField.getName()
);
 
-        assertSame( intField, intFieldReturned );
+        assertEquals( intField, intFieldReturned );
 
-        Field<Long> longFieldReturned = entity.getField( longField.getName() );
+        Field<Long> longFieldReturned = returned.getEntity().get().getField( longField.getName()
);
 
-        assertSame( longField, longFieldReturned );
+        assertEquals( longField, longFieldReturned );
 
-        Field<String> stringFieldReturned = entity.getField( stringField.getName()
);
+        Field<String> stringFieldReturned = returned.getEntity().get().getField( stringField.getName()
);
 
-        assertSame( stringField, stringFieldReturned );
+        assertEquals( stringField, stringFieldReturned );
 
-        Field<UUID> uuidFieldReturned = entity.getField( uuidField.getName() );
+        Field<UUID> uuidFieldReturned = returned.getEntity().get().getField( uuidField.getName()
);
 
-        assertSame( uuidField, uuidFieldReturned );
+        assertEquals( uuidField, uuidFieldReturned );
 
 
         Set<Field> results = new HashSet<Field>();
-        results.addAll( entity.getFields() );
+        results.addAll( returned.getEntity().get().getFields());
 
 
         assertTrue( results.contains( boolField ) );


Mime
View raw message