1 /* Copyright 2006-2007 Graeme Rocher
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
15 package org
.codehaus
.groovy
.grails
.webflow
.executor
.support
17 * Tests for GrailsConventionsFlowExecutorArgumentHandler
19 * @author Graeme Rocher
22 * Created: Jul 3, 2007
27 import grails
.util
.GrailsWebUtil
28 import org
.springframework
.web
.context
.request
.RequestContextHolder
30 class GrailsConventionsFlowExecutorArgumentsHandlerTests
extends GroovyTestCase
{
34 webRequest
= GrailsWebUtil
.bindMockWebRequest()
37 RequestContextHolder
.setRequestAttributes(null)
40 void testFlowExecutorArgumentsHandler() {
42 def argHandler
= new GrailsConventionsFlowExecutorArgumentHandler(webRequest
)
43 assert !argHandler
.isFlowIdPresent(null)
45 webRequest
.actionName
= "foo"
47 assert argHandler
.isFlowIdPresent(null)
48 assertEquals
"foo", argHandler
.extractFlowId(null)