package gov.nih.nci.cabig.caaers.domain.workflow;

import junit.framework.TestCase;

import org.apache.commons.lang.StringUtils;

public class ReviewCommentTest extends TestCase {
	ReviewComment comment;
	protected void setUp() throws Exception {
		super.setUp();
		comment = new ReportingPeriodReviewComment();
	}

	public void testGetFullComment() {
		assertTrue(StringUtils.isEmpty(comment.getFullComment()));
		comment.setAutoGeneratedText("Hello");
		assertEquals("Hello", comment.getFullComment());
		comment.setAutoGeneratedText(null);
		assertTrue(StringUtils.isEmpty(comment.getFullComment()));
		comment.setUserComment("World");
		System.out.println(comment.getFullComment());
		assertEquals(" : World", comment.getFullComment());
		
		comment.setAutoGeneratedText("Hello");
		assertEquals("Hello : World", comment.getFullComment());
	}

}

package gov.nih.nci.cabig.caaers.domain.workflow;

import junit.framework.TestCase;

import org.apache.commons.lang.StringUtils;

public class ReviewCommentTest extends TestCase {
	ReviewComment comment;
	protected void setUp() throws Exception {
		super.setUp();
		comment = new ReportingPeriodReviewComment();
	}

	public void testGetFullComment() {
		assertTrue(StringUtils.isEmpty(comment.getFullComment()));
		comment.setAutoGeneratedText("Hello");
		assertEquals("Hello", comment.getFullComment());
		comment.setAutoGeneratedText(null);
		assertTrue(StringUtils.isEmpty(comment.getFullComment()));
		comment.setUserComment("World");
		System.out.println(comment.getFullComment());
		assertEquals(" : World", comment.getFullComment());
		
		comment.setAutoGeneratedText("Hello");
		assertEquals("Hello : World", comment.getFullComment());
	}
	
	
	public void testIsEditable(){
		assertNull(comment.getEditable());
		comment.setEditable(Boolean.TRUE);
		assertTrue(comment.getEditable());
	}
	
	public void testGetUserId(){
		assertNull(comment.getUserId());
		comment.setUserId("abcd");
		assertEquals("abcd", comment.getUserId());
	}
}

test cases improvement