Further unit tests: loading a variable.
[cfb.git] / 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);
        }
 }