Created
May 9, 2012 05:25
-
-
Save uris77/2642088 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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