Skip to content

Instantly share code, notes, and snippets.

@uris77
Created May 9, 2012 05:25
Show Gist options
  • Save uris77/2642088 to your computer and use it in GitHub Desktop.
Save uris77/2642088 to your computer and use it in GitHub Desktop.
package org.wherecaniget
import static org.junit.Assert.*
import org.junit.*
import grails.test.mixin.*
import grails.test.mixin.support.*
@TestMixin(GrailsUnitTestMixin)
@Mock([Store])
@TestFor(StoreService)
class StoreServiceTests{
@Test
void create_new_store(){
StoreService storeService = new StoreService()
def store = [name: 'Test Store']
def newStore = storeService.create(store)
assertNotNull newStore.id
assertEquals 'Test Store', newStore.name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment