db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker QueryTest.java
Date Wed, 05 Nov 2003 21:07:12 GMT
brj         2003/11/05 13:07:12

  Modified:    src/test/org/apache/ojb/broker QueryTest.java
  Log:
  fixed some testCases
  
  Revision  Changes    Path
  1.40      +8 -8      db-ojb/src/test/org/apache/ojb/broker/QueryTest.java
  
  Index: QueryTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/QueryTest.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- QueryTest.java	5 Nov 2003 19:50:11 -0000	1.39
  +++ QueryTest.java	5 Nov 2003 21:07:11 -0000	1.40
  @@ -791,10 +791,10 @@
   
   
   		Criteria crit = new Criteria();
  -		crit.addEqualTo("groupId", new Integer(5));
  +		crit.addGreaterOrEqualThan("allArticlesInGroup.articleId", new Integer(75));
   
  -		ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit, true);
  -		q.setColumns(new String[]{"groupId", "groupName", "allArticlesInGroup.articleId", "allArticlesInGroup.articleName"});
  +		ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit,true);
  +		q.setColumns(new String[]{"groupId", "groupName"});
   
   		Iterator iter = broker.getReportQueryIteratorByQuery(q);
   		while (iter.hasNext())
  @@ -802,8 +802,8 @@
   			list.add(iter.next());
   		}
   
  -		// 7 Articles, 2 Books, 3 Cds
  -		assertEquals("check size", list.size(), 7);
  +		// Groups: 1, 2, 5
  +		assertEquals("check size", list.size(), 3);
   	}
   
       /**
  @@ -818,7 +818,7 @@
   		crit.addLike("allArticlesInGroup.articleName", "%%");
   
   		ReportQueryByCriteria q = QueryFactory.newReportQuery(ProductGroup.class, crit, true);
  -		q.setColumns(new String[] { "groupId", "groupName", "allArticlesInGroup.articleId", "allArticlesInGroup.articleName"
});
  +		q.setColumns(new String[] { "groupId", "groupName" });
   
   		Iterator iter = broker.getReportQueryIteratorByQuery(q);
   		while (iter.hasNext())
  @@ -826,8 +826,8 @@
   			list.add(iter.next());
   		}
   
  -		// 3 Books , 1 Dairy Product
  -		assertEquals("check size", list.size(), 4);
  +		// Groups: 3 Books , 1 Dairy Product
  +		assertEquals("check size", list.size(), 2);
   	}
   
   	/**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message