/**
 * <License>
 */
package edu.colorado.csdms.wmt;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import edu.colorado.csdms.wmt.client.data.Port;

/**
 * Tests for {@link Port}.
 * 
 * @author Mark Piper (mark.piper@colorado.edu)
 */
public class PortTest {

  private Port port;
  private String id;
  
  @Before
  public void setUp() throws Exception {
    id = "test";
    port = new Port(id, true);
  }

  @After
  public void tearDown() throws Exception {
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#Port()}.
   */
  @Test
  public void testPortZeroArgCtr() {
    Port port0 = new Port();
    assertNotNull(port0);
    assertNull(port0.getId());
    assertFalse(port0.isRequired());
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#Port(java.lang.String)}.
   */
  @Test
  public void testPortOneArgCtr() {
    Port port1 = new Port(id);
    assertNotNull(port1);
    assertEquals(id, port1.getId());
    assertFalse(port1.isRequired());
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#getId()}.
   */
  @Test
  public void testGetId() {
    assertEquals(id, port.getId());
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#setId(java.lang.String)}.
   */
  @Test
  public void testSetId() {
    port.setId("foo");
    assertEquals("foo", port.getId());
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#isRequired()}.
   */
  @Test
  public void testIsRequired() {
    assertTrue(port.isRequired());
  }

  /**
   * Test method for {@link edu.colorado.mpiper.client.Port#isRequired(java.lang.Boolean)}.
   */
  @Test
  public void testIsRequiredBoolean() {
    port.isRequired(false);
    assertFalse(port.isRequired());
  }

}

@@ -358,16 +358,44 @@
 ing id;%0A
+  private Boolean requires;%0A
   %0A  @Be
@@ -457,16 +457,37 @@
 %22test%22;%0A
+    requires = true;%0A
     port
@@ -502,20 +502,24 @@
 ort(id, 
-true
+requires
 );%0A  %7D%0A%0A
@@ -1099,32 +1099,292 @@
 quired());%0A  %7D%0A%0A
+  /**%0A   * Test method for %7B@link Port#Port(String, Boolean)%7D.%0A   */%0A  @Test%0A  public void testPortTwoArgCtr() %7B%0A    Port port2 = new Port(id, requires);%0A    assertNotNull(port2);%0A    assertEquals(id, port2.getId());%0A    assertTrue(port2.isRequired());%0A  %7D%0A  %0A
   /**%0A   * Test 

Add two-arg constructor test to PortTest