/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package it.gotoandplay.smartfoxclient.test;

import it.gotoandplay.smartfoxclient.util.Entities;

/*
 *
 * @author Lapo
 */
public class TestEntitiesCodec 
{

    public TestEntitiesCodec()
    {
	test1();
    }
    
    void test1()
    {
	String s1 = "If A < B and B < C then A < C.";
	String s2 = "The \"cat\" & the 'dog' & the \"mouse\" run in the green field. ";
	
	String enc1 = Entities.encodeEntities(s1);
	String enc2 = Entities.encodeEntities(s2);
	
	System.out.println("-> " + enc1);
	System.out.println("-> " + enc2);
	
	System.out.println("----> " + Entities.decodeEntities(enc1));
	System.out.println("----> " + Entities.decodeEntities(enc2));
    }
    
    public static void main(String args[])
    {
	new TestEntitiesCodec();
    }
}
