Package org.geoserver.rest.format

Source Code of org.geoserver.rest.format.ReflectiveHTMLFormatTest

/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
* This code is licensed under the GPL 2.0 license, availible at the root
* application directory.
*/
package org.geoserver.rest.format;

import org.geoserver.rest.Foo;
import org.geoserver.rest.format.ReflectiveHTMLFormat;
import org.restlet.data.Request;
import org.restlet.resource.Representation;

import junit.framework.TestCase;

public class ReflectiveHTMLFormatTest extends TestCase {

    public void test() throws Exception {
        Request request = new Request();
        request.setResourceRef( "http://localhost/rest/foo.html");
        request.getResourceRef().setBaseRef( "http://localhost/rest");
       
        ReflectiveHTMLFormat fmt = new ReflectiveHTMLFormat(Foo.class,request,null,null);
        Representation rep = fmt.toRepresentation(new Foo("one",2,3.0));
        rep.write(System.out);
    }
   
}
TOP

Related Classes of org.geoserver.rest.format.ReflectiveHTMLFormatTest

TOP
Copyright © 2018 www.massapi.com. 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.