projects
/
cfb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7ac6be1
)
Further unit tests: getVarId()
author
Chris Jaekl
<cejaekl@yahoo.com>
Wed, 30 Dec 2015 09:46:32 +0000
(18:46 +0900)
committer
Chris Jaekl
<cejaekl@yahoo.com>
Wed, 30 Dec 2015 09:46:32 +0000
(18:46 +0900)
test/net/jaekl/cfb/store/DbStoreTest.java
patch
|
blob
|
history
diff --git
a/test/net/jaekl/cfb/store/DbStoreTest.java
b/test/net/jaekl/cfb/store/DbStoreTest.java
index 98656c81872c42af2a7a6466e5be6021d4ecc4c9..9c6c1175c0b56098d4544901201d87bb59936db4 100644
(file)
--- a/
test/net/jaekl/cfb/store/DbStoreTest.java
+++ b/
test/net/jaekl/cfb/store/DbStoreTest.java
@@
-292,4
+292,16
@@
public class DbStoreTest {
assertEquals(StoreException.Type.INVALID_VAR_ID, exc.getType());
}
}
+
+ @Test
+ public void testGetVarId_notFoundIsStored() throws SQLException, TypeMismatchException {
+ LocalVariable var = new LocalVariable(2345678901L, "VariableNameDoesNotYetExist", "VARIABLE_READ");
+
+ Long varId = m_store.getVarId(var);
+ assertNotNull(varId);
+ assertTrue(varId.longValue() > 0);
+
+ Long secondVarId = m_store.getVarId(var);
+ assertEquals(varId, secondVarId);
+ }
}