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

import org.apache.commons.lang3.RandomStringUtils;
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 testGetId(){
        final String expected = RandomStringUtils.randomAlphabetic(20);
        deterLabUserEntity.setId(expected);
        String actual=deterLabUserEntity.getId();

        assertThat(actual).isNotNull();
        assertThat(actual).isEqualTo(expected);
    }

    @Test
    public void testGetNclTeamId(){
        final String expected = RandomStringUtils.randomAlphabetic(20);
        deterLabUserEntity.setNclTeamId(expected);
        String actual=deterLabUserEntity.getNclTeamId();

        assertThat(actual).isNotNull();
        assertThat(actual).isEqualTo(expected);
    }

    @Test
    public void testGetDeterProjectId(){
        final String expected = RandomStringUtils.randomAlphabetic(20);
        deterLabUserEntity.setDeterProjectId(expected);
        String actual=deterLabUserEntity.getDeterProjectId();

        assertThat(actual).isNotNull();
        assertThat(actual).isEqualTo(expected);
    }


}

@@ -393,19 +393,18 @@
 y;%0A%0A
+%0A
     @
-Before
+Test
 %0A   
@@ -420,13 +420,29 @@
 oid 
-setup
+testGetIdDefaultValue
 ()%7B%0A
@@ -493,24 +493,112 @@
 ctEntity();%0A
+        String actual=deterLabUserEntity.getId();%0A%0A        assertThat(actual).isNull();%0A
     %7D%0A%0A    @
@@ -618,25 +618,25 @@
 ic void test
-G
+S
 etId()%7B%0A    
@@ -694,32 +694,89 @@
 mAlphabetic(20);
+%0A%0A        deterLabUserEntity=new DeterLabProjectEntity();
 %0A        deterLa
@@ -859,48 +859,8 @@
 );%0A%0A
-        assertThat(actual).isNotNull();%0A
     
@@ -952,16 +952,232 @@
 clTeamId
+DefaultValue()%7B%0A        deterLabUserEntity=new DeterLabProjectEntity();%0A        String actual=deterLabUserEntity.getNclTeamId();%0A%0A        assertThat(actual).isNull();%0A    %7D%0A%0A    @Test%0A    public void testSetNclTeamId
 ()%7B%0A    
@@ -1235,32 +1235,89 @@
 mAlphabetic(20);
+%0A%0A        deterLabUserEntity=new DeterLabProjectEntity();
 %0A        deterLa
@@ -1414,48 +1414,8 @@
 );%0A%0A
-        assertThat(actual).isNotNull();%0A
     
@@ -1498,16 +1498,241 @@
  testGet
+eterProjectIdDefaultValue()%7B%0A        deterLabUserEntity=new DeterLabProjectEntity();%0A        String actual=deterLabUserEntity.getDeterProjectId();%0A%0A        assertThat(actual).isNull();%0A    %7D%0A%0A    @Test%0A    public void testSet
 DeterPro
@@ -1812,16 +1812,73 @@
 tic(20);
+%0A%0A        deterLabUserEntity=new DeterLabProjectEntity();
 %0A       
@@ -1993,48 +1993,8 @@
 );%0A%0A
-        assertThat(actual).isNotNull();%0A
     

update testing for default value