org.apache.tapestry.util
Class ScriptUtilsTest

java.lang.Object
  extended by BaseComponentTestCase
      extended by org.apache.tapestry.util.ScriptUtilsTest

public class ScriptUtilsTest
extends BaseComponentTestCase

Tests functionality of ScriptUtils.


Field Summary
static String BEGIN_COMMENT
           
static String END_COMMENT
           
protected static String JAVASCRIPT_NOCOMMENT
           
protected static String MULTI_JAVASCRIPT_NOCOMMENT
           
protected static String TEST_INPUT_INCLUDE
           
protected static String TEST_INPUT1
           
protected static String TEST_INPUT2
           
protected static String TEST_INPUT3
           
protected static String TEST_INPUT4
           
 
Constructor Summary
ScriptUtilsTest()
           
 
Method Summary
 void test_Complete_Return()
          Tests that the complete string is returned, with any js in it "fixed".
 void test_Ensure_Valid_Script_Tags_With_Html_Comments()
           
 void test_Ensure_Valid_Script_Tags()
          Calls ScriptUtils.ensureValidScriptTags(String) with JAVASCRIPT_NOCOMMENT and tests that it returns a validly marked up content block capable of being embedded in an xml document.
 void test_Find_Multiple_Scripts()
          Tests finding JAVASCRIPT_NOCOMMENT with regular expressions.
 void test_Find_Script()
          Tests finding JAVASCRIPT_NOCOMMENT with regular expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVASCRIPT_NOCOMMENT

protected static final String JAVASCRIPT_NOCOMMENT
See Also:
Constant Field Values

MULTI_JAVASCRIPT_NOCOMMENT

protected static final String MULTI_JAVASCRIPT_NOCOMMENT
See Also:
Constant Field Values

TEST_INPUT1

protected static final String TEST_INPUT1
See Also:
Constant Field Values

TEST_INPUT2

protected static final String TEST_INPUT2
See Also:
Constant Field Values

TEST_INPUT3

protected static final String TEST_INPUT3
See Also:
Constant Field Values

TEST_INPUT4

protected static final String TEST_INPUT4
See Also:
Constant Field Values

TEST_INPUT_INCLUDE

protected static final String TEST_INPUT_INCLUDE
See Also:
Constant Field Values

BEGIN_COMMENT

public static final String BEGIN_COMMENT
See Also:
Constant Field Values

END_COMMENT

public static final String END_COMMENT
See Also:
Constant Field Values
Constructor Detail

ScriptUtilsTest

public ScriptUtilsTest()
Method Detail

test_Find_Script

public void test_Find_Script()
Tests finding JAVASCRIPT_NOCOMMENT with regular expressions.


test_Find_Multiple_Scripts

public void test_Find_Multiple_Scripts()
Tests finding JAVASCRIPT_NOCOMMENT with regular expressions.


test_Ensure_Valid_Script_Tags

public void test_Ensure_Valid_Script_Tags()
Calls ScriptUtils.ensureValidScriptTags(String) with JAVASCRIPT_NOCOMMENT and tests that it returns a validly marked up content block capable of being embedded in an xml document.


test_Ensure_Valid_Script_Tags_With_Html_Comments

public void test_Ensure_Valid_Script_Tags_With_Html_Comments()

test_Complete_Return

public void test_Complete_Return()
Tests that the complete string is returned, with any js in it "fixed".



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.