Permalink
Browse files

whitespace, cleanup

  • Loading branch information...
1 parent a600296 commit 6e35061ae826f63037e35d79d3f756b128b95f3b Burt Beckwith committed May 20, 2012
@@ -23,15 +23,15 @@ class DemoController {
render "Value From Service Is \"${basicCachingService.data}\""
}
- def cachePut(String key, String value) {
- def result = basicCachingService.getData(key, value)
- render "Result: ${result}"
- }
-
- def cacheGet(String key) {
- def result = basicCachingService.getData(key)
- render "Result: ${result}"
- }
+ def cachePut(String key, String value) {
+ def result = basicCachingService.getData(key, value)
+ render "Result: ${result}"
+ }
+
+ def cacheGet(String key) {
+ def result = basicCachingService.getData(key)
+ render "Result: ${result}"
+ }
def blockCache(int counter) {
[counter: counter]
@@ -6,7 +6,7 @@ Renders a GSP template and caches the result so that the next time the same temp
This tag behaves just like the @g:render@ tag provided by Grails except this one caches the rendered result so the template doesn't have to be re-evaluated each time it is rendered.
-By default the key used in the cache is the path to the template. If the same template is rendered multiple times with a different model, an explicit key should be provided, otherwise the separate invocations (with different models) will share the same cache entry.
+By default the key used in the cache is the path to the template. If the same template is rendered multiple times with a different model, an explicit key should be provided, otherwise the separate invocations (with different models) will share the same cache entry.
{code:xml}
<cache:render template="myTemplate" model="[user: currentUser]" key="${currentUser.id}"/>
@@ -1,6 +1,8 @@
package com.demo
-class CacheTagFunctionalTests extends functionaltestplugin.FunctionalTestCase {
+import functionaltestplugin.FunctionalTestCase
+
+class CacheTagFunctionalTests extends FunctionalTestCase {
void testBlockTag() {
get '/demo/blockCache?counter=5'
@@ -95,4 +97,4 @@ class CacheTagFunctionalTests extends functionaltestplugin.FunctionalTestCase {
assertContentContains 'Fourth invocation: Counter value: 7'
assertContentContains 'Fifth invocation: Counter value: 5'
}
-}
+}
@@ -1,6 +1,8 @@
package com.demo
-class CachingServiceFunctionalTests extends functionaltestplugin.FunctionalTestCase {
+import functionaltestplugin.FunctionalTestCase
+
+class CachingServiceFunctionalTests extends FunctionalTestCase {
void testBasicCachingService() {
get '/demo/basicCachingServiceInvocationCount'
@@ -29,40 +31,40 @@ class CachingServiceFunctionalTests extends functionaltestplugin.FunctionalTestC
}
void testBasicCachePutService() {
- get '/demo/cacheGet?key=band'
- assertStatus 200
- assertContentContains 'Result: null'
+ get '/demo/cacheGet?key=band'
+ assertStatus 200
+ assertContentContains 'Result: null'
- get '/demo/cachePut?key=band&value=Thin+Lizzy'
- assertStatus 200
- assertContentContains 'Result: ** Thin Lizzy **'
+ get '/demo/cachePut?key=band&value=Thin+Lizzy'
+ assertStatus 200
+ assertContentContains 'Result: ** Thin Lizzy **'
- get '/demo/cacheGet?key=band'
- assertStatus 200
- assertContentContains 'Result: ** Thin Lizzy'
+ get '/demo/cacheGet?key=band'
+ assertStatus 200
+ assertContentContains 'Result: ** Thin Lizzy'
- get '/demo/cacheGet?key=singer'
- assertStatus 200
- assertContentContains 'Result: null'
+ get '/demo/cacheGet?key=singer'
+ assertStatus 200
+ assertContentContains 'Result: null'
- get '/demo/cachePut?key=singer&value=Phil+Lynott'
- assertStatus 200
- assertContentContains 'Result: ** Phil Lynott **'
+ get '/demo/cachePut?key=singer&value=Phil+Lynott'
+ assertStatus 200
+ assertContentContains 'Result: ** Phil Lynott **'
- get '/demo/cacheGet?key=singer'
- assertStatus 200
- assertContentContains 'Result: ** Phil Lynott'
+ get '/demo/cacheGet?key=singer'
+ assertStatus 200
+ assertContentContains 'Result: ** Phil Lynott'
- get '/demo/cachePut?key=singer&value=John+Sykes'
- assertStatus 200
- assertContentContains 'Result: ** John Sykes **'
+ get '/demo/cachePut?key=singer&value=John+Sykes'
+ assertStatus 200
+ assertContentContains 'Result: ** John Sykes **'
- get '/demo/cacheGet?key=singer'
- assertStatus 200
- assertContentContains 'Result: ** John Sykes'
+ get '/demo/cacheGet?key=singer'
+ assertStatus 200
+ assertContentContains 'Result: ** John Sykes'
- get '/demo/cacheGet?key=band'
- assertStatus 200
- assertContentContains 'Result: ** Thin Lizzy'
+ get '/demo/cacheGet?key=band'
+ assertStatus 200
+ assertContentContains 'Result: ** Thin Lizzy'
}
}
@@ -1,10 +1,12 @@
package com.demo
-class DynamicScaffoldingFunctionalTests extends functionaltestplugin.FunctionalTestCase {
-
+import functionaltestplugin.FunctionalTestCase
+
+class DynamicScaffoldingFunctionalTests extends FunctionalTestCase {
+
void testDynamicScaffolding() {
get '/person/list'
assertStatus 200
assertTitle 'Person List'
}
-}
+}

0 comments on commit 6e35061

Please sign in to comment.