Further unit tests: loading a variable.
authorChris Jaekl <cejaekl@yahoo.com>
Wed, 30 Dec 2015 09:51:18 +0000 (18:51 +0900)
committerChris Jaekl <cejaekl@yahoo.com>
Wed, 30 Dec 2015 09:51:18 +0000 (18:51 +0900)
test/net/jaekl/cfb/store/DbStoreTest.java

index 9c6c1175c0b56098d4544901201d87bb59936db4..1e7802929d89c798e944c3286b21f03312967db0 100644 (file)
@@ -294,7 +294,7 @@ public class DbStoreTest {
        }
 
        @Test
-       public void testGetVarId_notFoundIsStored() throws SQLException, TypeMismatchException {
+       public void testGetVarId_notFoundIsStored() throws SQLException, TypeMismatchException, StoreException {
                LocalVariable var = new LocalVariable(2345678901L, "VariableNameDoesNotYetExist", "VARIABLE_READ");
 
                Long varId = m_store.getVarId(var);
@@ -303,5 +303,8 @@ public class DbStoreTest {
                
                Long secondVarId = m_store.getVarId(var);
                assertEquals(varId, secondVarId);
+               
+               LocalVariable loadedVar = m_store.getVar(secondVarId);
+               assertEquals(var, loadedVar);
        }
 }