Created
May 2, 2012 03:17
-
-
Save uris77/2573334 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 zk.mvvm | |
import static org.junit.Assert.* | |
import grails.test.mixin.* | |
import grails.test.mixin.support.* | |
import org.junit.* | |
import com.example.* | |
/** | |
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions | |
*/ | |
@TestMixin(GrailsUnitTestMixin) | |
class PersonViewModelTests { | |
@Before | |
void setUp() { | |
} | |
void tearDown() { | |
} | |
@Test | |
void create_person() { | |
PersonViewModel vm = new PersonViewModel() | |
vm.personFacade = [create: {[id:1, firstName: 'First', lastName: 'Last']}] | |
vm.save() | |
assertNotNull vm.person.id | |
assertEquals 1, vm.person.id | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment