@@ -0,0 +1,1949 @@
+/**%0A * %3CLicense%3E%0A */%0Apackage edu.colorado.csdms.wmt.client;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport com.google.gwt.junit.client.GWTTestCase;%0A%0Aimport edu.colorado.csdms.wmt.client.data.ComponentJSO;%0A%0A/**%0A * Tests for %7B@link ComponentJSO%7D. JUnit integration is provided by extending%0A * %7B@link GWTTestCase%7D.%0A * %0A * @see http://www.gwtproject.org/doc/latest/DevGuideTesting.html%0A * @see http://www.gwtproject.org/doc/latest/tutorial/JUnit.html%0A * @see http://blog.danielwellman.com/2008/08/testing-json-parsing-using-javascript-overlay-types-in-gwt-15.html%0A * @author Mark Piper (mark.piper@colorado.edu)%0A */%0Apublic class ComponentJSOTest extends GWTTestCase %7B%0A%0A  private ComponentJSO componentJSO;%0A  private String id;%0A  private String componentClass;%0A  private String name;  %0A  %0A  /**%0A   * The module that sources this class. Must be present.%0A   */%0A  @Override%0A  public String getModuleName() %7B%0A     return %22edu.colorado.csdms.wmt.WMT%22;%0A  %7D%0A  %0A  /**%0A   * A JSNI method that defines a fixture for the tests. Returns a%0A   * %7B@link ComponentJSO%7D object for testing.%0A   * %0A   * @param id%0A   * @param componentClass%0A   * @param name%0A   */%0A  private native ComponentJSO testComponentJSO(String id, String componentClass,%0A      String name) /*-%7B%0A%09%09return %7B%0A%09%09%09%22id%22 : id,%0A%09%09%09%22class%22 : componentClass,%0A%09%09%09%22name%22 : name%0A%09%09%7D%0A  %7D-*/;  %0A  %0A  @Before%0A  @Override%0A  protected void gwtSetUp() throws Exception %7B%0A    id = %22child%22;%0A    componentClass = %22Child%22;%0A    name = %22Child_0%22;%0A    componentJSO = testComponentJSO(id, componentClass, name);%0A  %7D%0A%0A  @After%0A  @Override%0A  protected void gwtTearDown() throws Exception %7B%0A  %7D%0A%0A  @Test%0A  public void testGetId() %7B%0A    assertEquals(id, componentJSO.getId());%0A  %7D%0A%0A  @Test%0A  public void testGetComponentClass() %7B%0A    assertEquals(componentClass, componentJSO.getComponentClass());%0A  %7D%0A  %0A  @Test%0A  public void testGetName() %7B%0A    assertEquals(name, componentJSO.getName());%0A  %7D%0A%7D%0A

Add tests for new methods in ComponentJSO