GrailsInAction / graina2

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

Chapter 9, Page 240, first line, "When you give..." #135

Open MudassarBashir opened 9 years ago

MudassarBashir commented 9 years ago

Should the word for be in the part of the sentence before the comma? Which would make it read as:

When you give the @TestFor and @Mock annotations for one or more classes,...

Or am I just not reading it right? Thanks.

pledbrook commented 9 years ago

It's not terribly clear, but "give" means declare as an argument. So if you have code like this:

 @TestFor(PostController)
 @Mock([User, Profile])

you're "giving" the @TestFor annotation one class and the @Mock annotation two classes.

Perhaps a better wording would be "When you declare one or more classes in the @TestFor and @Mock annotations, ..."

MudassarBashir commented 9 years ago

Ah, got it now. We are giving the classes to be enhanced TO the annotations. Thanks much.