Skip to content

Commit

Permalink
Added Test For StoreService
Browse files Browse the repository at this point in the history
  • Loading branch information
uris77 committed May 9, 2012
1 parent 057b91a commit 7a913da
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Empty file.
23 changes: 23 additions & 0 deletions test/unit/org/wherecaniget/StoreServiceTests.groovy
@@ -0,0 +1,23 @@
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
}
}

0 comments on commit 7a913da

Please sign in to comment.