package sg.ncl.adapter.deterlab.dtos.entities;

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

import static org.junit.Assert.assertEquals;
import static org.assertj.core.api.Assertions.assertThat;

/**
 * Created by Tran Ly Vu on 10/3/2016.
 */

public class DeterLabProjectEntityTest {
    private DeterLabProjectEntity deterLabUserEntity;

    @Before
    public void setup(){
        deterLabUserEntity=new DeterLabProjectEntity();
    }

    @Test
    public void getterAndSetterTest(){
        deterLabUserEntity.setId("test1");
        deterLabUserEntity.setNclTeamId("test2");
        deterLabUserEntity.setDeterProjectId("test3");

        String actual1=deterLabUserEntity.getId();
        String actual2=deterLabUserEntity.getNclTeamId();
        String actual3=deterLabUserEntity.getDeterProjectId();

        assertThat(actual1).isNotNull();
        assertThat(actual2).isNotNull();
        assertThat(actual3).isNotNull();

        assertEquals("test1",actual1);
        assertEquals("test2",actual2);
        assertEquals("test3",actual3);
    }

}

@@ -41,16 +41,67 @@
 ities;%0A%0A
+import org.apache.commons.lang3.RandomStringUtils;%0A
 import o
@@ -519,30 +519,92 @@
 oid 
-getterAndSetterTest()%7B
+testGetId()%7B%0A        final String expected = RandomStringUtils.randomAlphabetic(20);
 %0A   
@@ -633,23 +633,24 @@
 y.setId(
-%22test1%22
+expected
 );%0A     
@@ -644,32 +644,46 @@
 ected);%0A        
+String actual=
 deterLabUserEnti
@@ -689,39 +689,26 @@
 ity.
-setNclTeamId(%22test2%22
+getId(
 );%0A
+%0A
         
 dete
@@ -707,122 +707,153 @@
     
-deterLabUserEntity.setDeterProjectId(%22test3%22
+assertThat(actual).isNotNull();%0A        assertEquals(expected,actual
 );%0A
-%0A
     
+%7D%0A%0A
     
-String actual1=deterLabUserEntity.get
+@Test%0A    public void testGetNclTeam
 Id()
-;%0A
+%7B%0A 
        
+final
  String 
 actu
@@ -852,16 +852,67 @@
 ing 
-actual2=
+expected = RandomStringUtils.randomAlphabetic(20);%0A        
 dete
@@ -926,17 +926,17 @@
 rEntity.
-g
+s
 etNclTea
@@ -939,16 +939,24 @@
 lTeamId(
+expected
 );%0A     
@@ -971,17 +971,16 @@
 g actual
-3
 =deterLa
@@ -998,20 +998,15 @@
 .get
-DeterProject
+NclTeam
 Id()
@@ -1033,17 +1033,16 @@
 t(actual
-1
 ).isNotN
@@ -1066,34 +1066,90 @@
 sert
-That(actual2).isNotNull();
+Equals(expected,actual);%0A    %7D%0A%0A    @Test%0A    public void testGetDeterProjectId()%7B
 %0A   
@@ -1157,50 +1157,80 @@
     
-assertThat(actual3).isNotNull(
+final String expected = RandomStringUtils.randomAlphabetic(20
 );%0A
-%0A
         
 asse
@@ -1229,39 +1229,119 @@
     
-assertEquals(%22test1%22,actual1
+deterLabUserEntity.setDeterProjectId(expected);%0A        String actual=deterLabUserEntity.getDeterProjectId(
 );%0A
+%0A
     
@@ -1354,30 +1354,31 @@
 sert
-Equals(%22test2%22,actual2
+That(actual).isNotNull(
 );%0A 
@@ -1401,23 +1401,23 @@
 als(
-%22test3%22
+expected
 ,actual
-3
 );%0A 
@@ -1422,10 +1422,11 @@
 %0A    %7D%0A%0A
+%0A
 %7D%0A

Split test cases