GrailsInAction / graina2

Source code for the 2nd edition of Grails in Action
90 stars 91 forks source link

Listing 3.14: clarify annotations #3

Open pledbrook opened 11 years ago

pledbrook commented 11 years ago

From this post on the Manning forums, current:

List<String> sortedPostContent = foundUser.posts.collect { it.content }.sort() #2
[...]
sortedPostContent == ['First', 'Second', 'Third'] #3
[...]

#2 Iterates through User’s posts
#3 Sorts posts alphabetically
[...]

for our test case we sort them alphabetically to make the comparison meaningful #3

Suggestion :

#2 Iterates through User’s posts and sort them alphabetically
#3 Compare retrieved values to known values

[...]

for our test case we sort them alphabetically to make the comparison meaningful #2