Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

spaces

  • Loading branch information...
commit 4a42440a92afea46b2193d856caaaafa6d9ffd57 1 parent f68b794
@fabiooshiro authored
Showing with 21 additions and 37 deletions.
  1. +6 −22 plugin.xml
  2. +15 −15 src/groovy/plastic/criteria/CriteriaDocTests.groovy
View
28 plugin.xml
@@ -1,38 +1,22 @@
-<plugin name='plastic-criteria' version='0.5' grailsVersion='2.2.0 &gt; *'>
+<plugin name='plastic-criteria' version='0.6' grailsVersion='1.3 &gt; *'>
<author>Fabio Issamu Oshiro</author>
<title>Plastic Criteria Plugin</title>
<description>Mock Grails Criteria for Unit Tests
</description>
<documentation>http://grails.org/plugin/plastic-criteria</documentation>
<type>PlasticCriteriaGrailsPlugin</type>
- <resources>
- <resource>plastic.criteria.Artist</resource>
- <resource>plastic.criteria.Portrait</resource>
- </resources>
+ <resources />
<repositories>
<repository name='grailsCentral' url='http://grails.org/plugins' />
+ <repository name='http://repo.grails.org/grails/core' url='http://repo.grails.org/grails/core/' />
<repository name='mavenCentral' url='http://repo1.maven.org/maven2/' />
- <repository name='http://download.java.net/maven/2/' url='http://download.java.net/maven/2/' />
</repositories>
<dependencies>
- <runtime>
- <dependency group='mysql' name='mysql-connector-java' version='5.1.21' />
- </runtime>
- </dependencies>
- <plugins>
<compile>
- <plugin group='org.grails.plugins' name='mail' version='1.0.1' />
- <plugin group='org.grails.plugins' name='cache' version='1.0.1' />
+ <dependency group='javassist' name='javassist' version='3.12.1.GA' />
</compile>
- <runtime>
- <plugin group='org.grails.plugins' name='jquery' version='1.8.3' />
- <plugin group='org.grails.plugins' name='hibernate' version='2.2.0' />
- <plugin group='org.grails.plugins' name='resources' version='1.1.6' />
- </runtime>
- <build>
- <plugin group='org.grails.plugins' name='tomcat' version='2.2.0' />
- </build>
- </plugins>
+ </dependencies>
+ <plugins />
<runtimePluginRequirements />
<behavior />
</plugin>
View
30 src/groovy/plastic/criteria/CriteriaDocTests.groovy
@@ -430,9 +430,9 @@ public class CriteriaDocTests {
new Portrait(artist: monet, name: 'Soleil levant 1').save()
def rs = Portrait.withCriteria {
eq('artist', monet)
- fetchMode('artist', FetchMode.JOIN)
- }
- assert 1 == rs.size()
+ fetchMode('artist', FetchMode.JOIN)
+ }
+ assert 1 == rs.size()
}
void test_unique_result(){
@@ -440,9 +440,9 @@ public class CriteriaDocTests {
def portrait = new Portrait(artist: monet, name: 'Soleil levant 1').save()
def result = Portrait.withCriteria {
eq('artist', monet)
- uniqueResult = true
- }
- assert result == portrait
+ uniqueResult = true
+ }
+ assert result == portrait
}
void test_unique_result_exception(){
@@ -452,21 +452,21 @@ public class CriteriaDocTests {
try{
Portrait.withCriteria {
eq('artist', monet)
- uniqueResult = true
- }
- fail("should throw an exception")
- }catch(org.hibernate.NonUniqueResultException e){
- // ok
- }
+ uniqueResult = true
+ }
+ fail("should throw an exception")
+ }catch(org.hibernate.NonUniqueResultException e){
+ // ok
+ }
}
void test_unique_result_null(){
def monet = new Artist(name: 'Monet').save()
def res = Portrait.withCriteria {
eq('artist', monet)
- uniqueResult = true
- }
- assert res == null
+ uniqueResult = true
+ }
+ assert res == null
}
void test_plastic_criteria_over_arrayList(){
Please sign in to comment.
Something went wrong with that request. Please try again.