Package org.rendersnake

Examples of org.rendersnake.Hash


public class HashTest extends TestCase {

   
    public void testEscape(){
        Hash h = new Hash("key","<&>");
        assertEquals(" key=\"&lt;&amp;&gt;\"", h.asCharSequence());
    }
View Full Code Here


        Hash h = new Hash("key","<&>");
        assertEquals(" key=\"&lt;&amp;&gt;\"", h.asCharSequence());
    }
    public void testFail(){
        try {
            new Hash("key");
            fail("should raise ex");
        } catch (IllegalArgumentException iex) {
            assertTrue(true);
        }
       
View Full Code Here

            assertTrue(true);
        }
       
    }
    public void testJavascript(){
        Hash h = new Hash("key","value");
        assertEquals("{key:'value'}", h.toJavascript());
    }
View Full Code Here

    public void testJavascript(){
        Hash h = new Hash("key","value");
        assertEquals("{key:'value'}", h.toJavascript());
    }
    public void testMultiKey(){
        Hash h = new Hash("key","value","key2","value2");
        assertTrue(h.toJavascript().indexOf("value2") != -1);
    }
View Full Code Here

    public void testMultiKey(){
        Hash h = new Hash("key","value","key2","value2");
        assertTrue(h.toJavascript().indexOf("value2") != -1);
    }
    public void testJavascriptBoolean(){
        Hash h = new Hash("bool",true);
        assertEquals("{bool:true}", h.toJavascript());
    }   
View Full Code Here

    public void testJavascriptBoolean(){
        Hash h = new Hash("bool",true);
        assertEquals("{bool:true}", h.toJavascript());
    }   
    public void testJavascriptInt(){
        Hash h = new Hash("int",42);
        assertEquals("{int:42}", h.toJavascript());
    }   
View Full Code Here

    }
   
    // public JQueryCanvas $() { return new JQueryCanvas(); }
   
    public void testSetup() {
        JQueryCanvas jc = $().ajaxSetup(new Hash("cache",false));
        System.out.println(jc.toJavascript());
    }
View Full Code Here

TOP

Related Classes of org.rendersnake.Hash

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.