Created
March 2, 2012 20:20
-
-
Save mguillermin/1961019 to your computer and use it in GitHub Desktop.
This file contains 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
public class BaseModelTest { | |
public static FakeApplication app; | |
@BeforeClass | |
public static void startApp() { | |
app = Helpers.fakeApplication(Helpers.inMemoryDatabase()); | |
Helpers.start(app); | |
} | |
@AfterClass | |
public static void stopApp() { | |
Helpers.stop(app); | |
} | |
} |
This file contains 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
public class CompanyTest extends BaseModelTest { | |
@Test | |
public void save() { | |
Company company = new Company("My Company"); | |
company.save(); | |
assertThat(company.id).isNotNull(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment