Skip to content
Browse files

Revert "spaces"

This reverts commit 4a42440.
  • Loading branch information...
1 parent 4a42440 commit 5cbe639e3fe56b1a63fe986ab6aba7e09805e667 @fabiooshiro committed Feb 20, 2013
Showing with 37 additions and 21 deletions.
  1. +22 −6 plugin.xml
  2. +15 −15 src/groovy/plastic/criteria/CriteriaDocTests.groovy
View
28 plugin.xml
@@ -1,22 +1,38 @@
-<plugin name='plastic-criteria' version='0.6' grailsVersion='1.3 &gt; *'>
+<plugin name='plastic-criteria' version='0.5' grailsVersion='2.2.0 &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 />
+ <resources>
+ <resource>plastic.criteria.Artist</resource>
+ <resource>plastic.criteria.Portrait</resource>
+ </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>
- <dependency group='javassist' name='javassist' version='3.12.1.GA' />
+ <plugin group='org.grails.plugins' name='mail' version='1.0.1' />
+ <plugin group='org.grails.plugins' name='cache' version='1.0.1' />
</compile>
- </dependencies>
- <plugins />
+ <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>
<runtimePluginRequirements />
<behavior />
</plugin>
View
30 src/groovy/plastic/criteria/CriteriaDocTests.groovy
@@ -430,19 +430,19 @@ 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(){
def monet = new Artist(name: 'Monet').save()
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(){

0 comments on commit 5cbe639

Please sign in to comment.
Something went wrong with that request. Please try again.