Try and spot the difference between the following two groovy statements
Hint: Having statement 1 throws an "org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: changefreq for class: MyServiceTests"
Statement2 is the correct one.
Statement 1:
mockDomain(NewSitemapUrl, [
new NewSitemapUrl(id: 10, loc:"http://example.com/10",lastmod:today, changefreq:"daily", priority: '1.0'),
new NewSitemapUrl(id: 20, loc:"http://example.com/20", lastmod:today, changefreq="daily", priority:'1.0'),
new NewSitemapUrl(id: 30, loc:"http://example.com/30", lastmod:today, changefreq="daily", priority:'1.0')
])
Statement 2:
mockDomain(NewSitemapUrl, [
new NewSitemapUrl(id: 10, loc:"http://example.com/10",lastmod:today, changefreq:"daily", priority: '1.0'),
new NewSitemapUrl(id: 20, loc:"http://example.com/20", lastmod:today, changefreq:"daily", priority:'1.0'),
new NewSitemapUrl(id: 30, loc:"http://example.com/30", lastmod:today, changefreq:"daily", priority:'1.0')
])
No comments:
Post a Comment