Package com.pugh.sockso.templates.api

Examples of com.pugh.sockso.templates.api.TAlbums.makeRenderer()


    protected void showAlbums( final List<Album> albums ) throws IOException {
       
        TAlbums tpl = new TAlbums();
        tpl.setAlbums( albums );
       
        getResponse().showJson( tpl.makeRenderer() );
       
    }

    /**
     *  Indicates if the action can handle the request
View Full Code Here


                .name("Album\"")
                .year("1980")
                .build()
                );
        tpl.setAlbums(albums);
        tpl.makeRenderer().renderTo(jsonWriter);

        String expected = "[{\"id\":2,\"name\":\"Album\\\"\",\"date_added\":\"null\",\"artist\":{\"id\":1,\"name\":\"Artist\\\"\",\"date_added\":\"null\"}}]";
        String actual = stringWriter.toString();

        assertEquals( expected, actual );
View Full Code Here

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.