[Notice] Announcing the End of Demo Server [Read me]
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
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
Milestone firstMilestone = Milestone.findById(1l); |
35 | 35 |
// Then |
36 | 36 |
assertThat(firstMilestone.title).isEqualTo("v.0.1"); |
37 |
- assertThat(firstMilestone.contents).isEqualTo("nFORGE 첫번째 버전."); |
|
37 |
+ assertThat(firstMilestone.getContents()).isEqualTo("nFORGE 첫번째 버전."); |
|
38 | 38 |
|
39 | 39 |
Calendar expactDueDate = new GregorianCalendar(); |
40 | 40 |
expactDueDate.set(2012, Calendar.JULY, 12, 23, 59, 59); // 2012-07-12 |
--- test/models/PostTest.java
+++ test/models/PostTest.java
... | ... | @@ -9,6 +9,7 @@ |
9 | 9 |
import controllers.SearchApp; |
10 | 10 |
import models.enumeration.Direction; |
11 | 11 |
|
12 |
+import org.apache.commons.lang.builder.ToStringBuilder; |
|
12 | 13 |
import org.junit.*; |
13 | 14 |
|
14 | 15 |
import com.avaje.ebean.Page; |
... | ... | @@ -49,9 +50,9 @@ |
49 | 50 |
Long id = Post.write(post); |
50 | 51 |
// Then |
51 | 52 |
Post actual = Post.findById(id); |
52 |
- |
|
53 |
+ System.out.println(ToStringBuilder.reflectionToString(actual) ); |
|
53 | 54 |
assertThat(actual.title).isEqualTo(post.title); |
54 |
- assertThat(actual.contents).isEqualTo(post.contents); |
|
55 |
+ assertThat(actual.getContents()).isEqualTo(post.contents); |
|
55 | 56 |
assertThat(actual.date).isEqualTo(post.date); |
56 | 57 |
assertThat(actual.authorId).isEqualTo(getTestUser().id); |
57 | 58 |
assertThat(actual.id).isEqualTo(id); |
... | ... | @@ -77,7 +78,8 @@ |
77 | 78 |
Post.edit(post); |
78 | 79 |
// Then |
79 | 80 |
Post actual = Post.findById(1l); |
80 |
- assertThat(actual.contents).isEqualTo("수정되었습니다."); |
|
81 |
+ System.out.println(ToStringBuilder.reflectionToString(actual) ); |
|
82 |
+ assertThat(actual.getContents()).isEqualTo("수정되었습니다."); |
|
81 | 83 |
assertThat(actual.commentCount).isEqualTo(1); |
82 | 84 |
} |
83 | 85 |
|
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?