package net.ihe.xcpd.init.model; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import junit.framework.TestCase; /** * * @author abderrazek boufahja * */ public class ResponderTest extends TestCase { Responder responder; public ResponderTest(String name) { super(name); } @BeforeMethod protected void setUp() throws Exception { super.setUp(); responder = new Responder(); } protected void tearDown() throws Exception { super.tearDown(); } @Test public void testResponderStringString() { Responder res = new Responder("1", "2"); assertEquals(res.getWsurl(), "1"); assertEquals(res.getDescription(), "2"); } @Test public void testResponderResponder() { Responder res1 = new Responder("1", "2"); Responder res2 = new Responder(res1); assertEquals(res1, res2); } @Test public void testSetId() { Integer i = new Integer(1); responder.setId(i); assertEquals(responder.getId(), i); } @Test public void testSetWsurl() { String string = new String("ss"); responder.setWsurl(string); assertEquals(responder.getWsurl(), string); } @Test public void testSetDescription() { String ss = new String("ss"); responder.setDescription(ss); assertEquals(responder.getDescription(), ss); } @Test public void testEqualsObject() { Responder res1 = new Responder("1", "2"); Responder res2 = new Responder("1", "2"); assertEquals(res1, res2); } }