Skip to content

Instantly share code, notes, and snippets.

@hongsw
Created November 13, 2012 15:00
Show Gist options
  • Select an option

  • Save hongsw/4066163 to your computer and use it in GitHub Desktop.

Select an option

Save hongsw/4066163 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","bob@ajinsys.com", "password", "Hello~ Play Framework 2.0." ).save();
Guestbook bob = Guestbook.find.where().eq("email", "bob@ajinsys.com").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