Skip to content

Instantly share code, notes, and snippets.

@hongsw
Created November 13, 2012 15:00
Show Gist options
  • Save hongsw/4066165 to your computer and use it in GitHub Desktop.
Save hongsw/4066165 to your computer and use it in GitHub Desktop.
package models;
생략
public class GuestbookTest {
@Before
public void setUp() {
start(fakeApplication(inMemoryDatabase()));
}
@Test
public void createAndRetrieveGuestbook() {
new Guestbook("Bob","[email protected]",
"password", "Hello~ Play Framework 2.0." ).save();
Guestbook bob = Guestbook.find.where().eq("email",
"[email protected]").findUnique();
assertNotNull(bob);
assertEquals("Bob", bob.name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment