1 package org
.codehaus
.groovy
.grails
.web
.pages
;
3 import junit
.framework
.TestCase
;
7 * Tests the GSP lexer (Scan class).
9 * @author a.shneyderman
11 public class ScanTests
extends TestCase
{
13 public void testTagsCustomNamespace() {
19 Scan s
= new Scan (gsp
);
21 while((next
= s
.nextToken()) != Tokens
.EOF
) {
22 if (next
== Tokens
.GSTART_TAG
||
23 next
== Tokens
.GEND_TAG
) {
24 assertEquals("tt", s
.getNamespace());
29 public void testTagsDefaultNamespace() {
35 Scan s
= new Scan (gsp
);
37 while((next
= s
.nextToken()) != Tokens
.EOF
) {
38 if (next
== Tokens
.GSTART_TAG
||
39 next
== Tokens
.GEND_TAG
) {
40 assertEquals(GroovyPage
.DEFAULT_NAMESPACE
, s
.getNamespace());