| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Bootstrap |
|
| 2.0;2 |
| 1 | import play.*; | |
| 2 | import play.jobs.*; | |
| 3 | import play.test.*; | |
| 4 | ||
| 5 | import models.*; | |
| 6 | ||
| 7 | @OnApplicationStart | |
| 8 | 1 | public class Bootstrap extends Job { |
| 9 | ||
| 10 | public void doJob() { | |
| 11 | // Check if the database is empty | |
| 12 | 1 | if(User.count() == 0) { |
| 13 | 1 | Fixtures.load("initial-data.yml"); |
| 14 | } | |
| 15 | 1 | } |
| 16 | ||
| 17 | } |