Package chunmap.view.sld

Source Code of chunmap.view.sld.SldTest

/**
* Copyright (c) 2009-2011, chunquedong(YangJiandong)
*
* This file is part of ChunMap project
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
*
* History:
*     2011-05-25  Jed Young  Creation
*/
package chunmap.view.sld;

import static org.junit.Assert.*;

import java.io.ByteArrayOutputStream;

import org.junit.Test;

import chunmap.view.render.Style2D;


public class SldTest {
  @Test
  public void testWrite()
  {
    //SldWriter writer = new SldWriter(new Style2D(), System.out);
    //writer.write();
  }
 
  @Test
  public void testAll()
  {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    Style2D style1 = new Style2D();
    style1.setPointSize(10);
    SldWriter writer = new SldWriter(style1, out);
    writer.write();
    String text = out.toString();
   
    //System.out.print(text);
   
    Style2D style = new SldReader().readString(text);
    assertTrue(style.getPointSize() == 10);
  }
}
TOP

Related Classes of chunmap.view.sld.SldTest

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.