[Notice] Announcing the End of Demo Server [Read me]
doortts doortts 2013-02-25
change @lob type field access method to access lob field we have to use gettter method
to access lob field we have to use gettter method

ex) object.field -> object.getField()
@8beeea8af6928c763004978640edf82d634e4e81
test/models/MilestoneTest.java
--- test/models/MilestoneTest.java
+++ test/models/MilestoneTest.java
@@ -34,7 +34,7 @@
         Milestone firstMilestone = Milestone.findById(1l);
         // Then
         assertThat(firstMilestone.title).isEqualTo("v.0.1");
-        assertThat(firstMilestone.contents).isEqualTo("nFORGE 첫번째 버전.");
+        assertThat(firstMilestone.getContents()).isEqualTo("nFORGE 첫번째 버전.");
 
         Calendar expactDueDate = new GregorianCalendar();
         expactDueDate.set(2012, Calendar.JULY, 12, 23, 59, 59); // 2012-07-12
test/models/PostTest.java
--- test/models/PostTest.java
+++ test/models/PostTest.java
@@ -9,6 +9,7 @@
 import controllers.SearchApp;
 import models.enumeration.Direction;
 
+import org.apache.commons.lang.builder.ToStringBuilder;
 import org.junit.*;
 
 import com.avaje.ebean.Page;
@@ -49,9 +50,9 @@
         Long id = Post.write(post);
         // Then
         Post actual = Post.findById(id);
-
+        System.out.println(ToStringBuilder.reflectionToString(actual) );
         assertThat(actual.title).isEqualTo(post.title);
-        assertThat(actual.contents).isEqualTo(post.contents);
+        assertThat(actual.getContents()).isEqualTo(post.contents);
         assertThat(actual.date).isEqualTo(post.date);
         assertThat(actual.authorId).isEqualTo(getTestUser().id);
         assertThat(actual.id).isEqualTo(id);
@@ -77,7 +78,8 @@
         Post.edit(post);
         // Then
         Post actual = Post.findById(1l);
-        assertThat(actual.contents).isEqualTo("수정되었습니다.");
+        System.out.println(ToStringBuilder.reflectionToString(actual) );
+        assertThat(actual.getContents()).isEqualTo("수정되었습니다.");
         assertThat(actual.commentCount).isEqualTo(1);
     }
     
Add a comment
List