Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void testDelete() {

// 2. verify
String sqlStr = "select count(*) from Person where person_id=" + p.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

// 3. delete
Expand All @@ -85,7 +85,7 @@ public void testDelete() {
setComplete();

// 4. verify delete:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void testCreateDelete() throws Exception {

// 2. verify
String sqlStr = "select count(*) from public.user where user_id=" + user.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

// 3. delete
Expand All @@ -93,7 +93,7 @@ public void testCreateDelete() throws Exception {
setComplete();

// 4. verify delte:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down Expand Up @@ -130,7 +130,7 @@ public void testDelete_Negative() throws Exception {
fixture.delete(user);

// 4. verify delte:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void xtestAddDelete() {

// 2. verify
String matrixSQL = "select count(*) from matrix where matrix_id = " + m.getId();
int count = jdbcTemplate.queryForObject(matrixSQL, Integer.class);
Integer count = jdbcTemplate.queryForObject(matrixSQL, Integer.class);
assertTrue(count == 1);

// 3. delete:
Expand Down Expand Up @@ -209,7 +209,7 @@ public void testupdatePublishedFlagByStudy() throws Exception {
// 3. verify
String treeCountStr = "select count(m.matrix_id) from matrix m "
+ " where m.study_ID = " + s.getId() + " and m.published is true";
int countVeri = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
Integer countVeri = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
logger.debug("verify Count = " + countVeri);
assertTrue(countVeri == count);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@ public void testdeleteByMatrixAndColumnRange() throws Exception {

// 4. verify
String sqlStr = "select count(*) from ROWSEGMENT rs, MATRIXROW r where r.MATRIXROW_ID = rs.MATRIXROW_ID and r.MATRIX_ID =" + m.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue("verify succeed count", count == result.getSuccessfulCount());

//5 test:
int start = 5;
int end = 30;
String colSizeStr = "select count(*) from ROWSEGMENT rs, MATRIXROW r where r.MATRIXROW_ID = rs.MATRIXROW_ID and r.MATRIX_ID =" + m.getId()
+ " and rs.startIndex between " + start + " and " + end + " and rs.endIndex between " + start + " and " + end;
int colSizeJDBC = jdbcTemplate.queryForObject(colSizeStr, Integer.class);
Integer colSizeJDBC = jdbcTemplate.queryForObject(colSizeStr, Integer.class);

int deleteCount = getFixture().deleteByMatrixAndColumnRange(m.getId(), start, end);

Expand All @@ -248,7 +248,7 @@ public void testdeleteByMatrixAndColumnRange() throws Exception {
endTransaction();

// 6. verify delete:
int countVerify = jdbcTemplate.queryForObject(subSQL, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(subSQL, Integer.class);
assertTrue("Submission deletion failed.", countVerify == 0);
countVerify = jdbcTemplate.queryForObject(studySQL, Integer.class);
assertTrue("Study deletion failed.", countVerify == 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testFinalAllUniqueAlgorithmDescriptions() {
// 2. verify
String sqlStr = "select count (distinct lower(description)) from algorithm";
// String sqlStr = "select count (distinct description) from algorithm";
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue("description size has to match.", count == descriptions.size());

// assertTrue(result != null);
Expand Down Expand Up @@ -90,7 +90,7 @@ public void testFindAllUniqueOtherAlgorithmDescriptions(String pPartialValue) {
// 2. verify
String sqlStr = "select count (distinct lower(description)) from algorithm where type='O'";
// String sqlStr = "select count (distinct description) from algorithm";
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue("description size has to match.", count == descriptions.size());

// assertTrue(result != null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void testFindByMatrix_fixture_1() throws Exception {
long dataId = data.iterator().next().getId();
String sqlStr = "select count(*) from analyzedData where AnalyzedData_id = " + dataId
+ " and matrix_id = " + m.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count > 0);

if (logger.isInfoEnabled()) {
Expand Down Expand Up @@ -123,7 +123,7 @@ public void testFindByTree_fixture_1() throws Exception {
long dataId = data.iterator().next().getId();
String sqlStr = "select count(*) from analyzedData where AnalyzedData_id = " + dataId
+ " and phylotree_id = " + m.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count > 0);

if (logger.isInfoEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void testPersistNexusClob() {

// 2. verify
String sqlStr = "select count(*) from Study_nexusFile where study_id=" + s.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

// assertTrue("need to return Analysis ID.", a1.getId() != null);
Expand All @@ -274,7 +274,7 @@ public void testPersistNexusClob() {
setComplete();

// 4. verify delte:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue("Deletion failed.", countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void testFindByMatrix() {
// 3. verify
String sqlStr = "select count(*) from sub_matrix where submission_id = " + s.getId()
+ " and matrix_id = " + m.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

if (logger.isInfoEnabled()) {
Expand Down Expand Up @@ -136,7 +136,7 @@ public void testFindByTree() {
// 3. verify
String sqlStr = "select count(*) from sub_treeblock st, phylotree t where st.submission_id = " + s.getId()
+ " and st.treeblock_id = t.treeblock_id and t.phylotree_id = " + tree.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

if (logger.isInfoEnabled()) {
Expand All @@ -159,7 +159,7 @@ public void testFindByReadyState() {

// 3. verify
String sqlStr = "select count(*) from study where studyStatus_ID = 2";
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count > 0);
assertTrue(s.size() == count);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void testFindByAnyTaxonLabel() throws Exception {
String treeCountStr = "select count(tree.phylotree_id) from phylotree tree, phylotreenode node "
+ " where tree.PHYLOTREE_ID = node.PHYLOTREE_ID and node.TAXONLABEL_ID = "
+ label.getId() + " and tree.PHYLOTREE_ID = " + treeId;
int count = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
assertTrue(count > 0);
}

Expand Down Expand Up @@ -165,7 +165,7 @@ public void testFindByStudy() throws Exception {
long treeId = phyloTree.getId();
String treeCountStr = "select count(tree.phylotree_id) from phylotree tree "
+ " where tree.study_ID = " + s.getId() + " and tree.PHYLOTREE_ID = " + treeId;
int count = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
assertTrue(count > 0);
}

Expand Down Expand Up @@ -208,7 +208,7 @@ public void testupdatePublishedFlagByStudy() throws Exception {
// 3. verify
String treeCountStr = "select count(tree.phylotree_id) from phylotree tree "
+ " where tree.study_ID = " + s.getId() + " and tree.published is true";
int countVeri = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
Integer countVeri = jdbcTemplate.queryForObject(treeCountStr, Integer.class);
logger.debug("verify Count = " + countVeri);
assertTrue(countVeri == count);

Expand Down Expand Up @@ -329,15 +329,15 @@ public void testCreateDelete() throws Exception {

// 2. verify
String sqlStr = "select count(*) from phylotree where phylotree_id=" + tree.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

// 3. delete
getFixture().delete(tree);
setComplete();

// 4. verify delete:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down Expand Up @@ -428,7 +428,7 @@ public void xtestCreateDeleteTreeBlock() throws Exception {
String analyzedDataSql = "select count(*) from analyzedData where analysisstep_id="
+ step1.getId();
String a1Sql = "select count(*) from analysis where analysis_id=" + a1.getId();
int count = jdbcTemplate.queryForObject(treeSql, Integer.class);
Integer count = jdbcTemplate.queryForObject(treeSql, Integer.class);
assertTrue(count == 2);
count = jdbcTemplate.queryForObject(blockSql, Integer.class);
assertTrue(count == 1);
Expand Down Expand Up @@ -459,7 +459,7 @@ public void xtestCreateDeleteTreeBlock() throws Exception {
endTransaction();

// 4. verify delete:
int countVerify = jdbcTemplate.queryForObject(blockSql, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(blockSql, Integer.class);
assertTrue(countVerify == 0);
countVerify = jdbcTemplate.queryForObject(treeSql, Integer.class);
assertTrue(countVerify == 0);
Expand Down Expand Up @@ -497,7 +497,7 @@ public void xxtestDeleteByID() throws Exception {

// 2. verify
String sqlStr = "select count(*) from phylotree where phylotree_id=" + tree.getId();
int count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer count = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(count == 1);

// 3. delete
Expand All @@ -506,7 +506,7 @@ public void xxtestDeleteByID() throws Exception {
endTransaction();

// 4. verify delete:
int countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
Integer countVerify = jdbcTemplate.queryForObject(sqlStr, Integer.class);
assertTrue(countVerify == 0);

if (logger.isInfoEnabled()) {
Expand Down
Loading