Exemplo n.º 1
0
 public void doJob() {
   // Check if the database is empty
   if (Account.count() == 0) {
     Fixtures.deleteDatabase();
     Fixtures.loadModels("data.yml");
   }
 }
Exemplo n.º 2
0
  @Test
  public void fullTest() {
    Fixtures.loadModels("data.yml");

    // Count things

  }
Exemplo n.º 3
0
 public void doJob() {
   // Check if the database is empty
   if (User.count() == 0) {
     // Initial data of the plateform
     Fixtures.load("initial-data.yml");
   }
 }
Exemplo n.º 4
0
 public void doJob() throws FileNotFoundException, IOException {
   // Check if the database is empty
   if (User.count() == 0) {
     Fixtures.loadModels("default-data.yml"); // Default User
     // load in pictures
     Photo photo;
     String path = new java.io.File(".").getCanonicalPath() + "/public/images/";
     photo =
         Photos.initFileToPhoto(path + "GreenTaijitu.png", "By Chinneeb via Wikimedia Commons");
     peacePhotoID = photo.id;
     photo = Photos.initFileToPhoto(path + "default.png", "Default Profile Photo");
     defaultProfilePhotoID = photo.id;
     photo = Photos.initFileToPhoto(path + "headerBG.png", "Default Header Background Photo");
     defaultHeaderPhotoID = photo.id;
     photo =
         Photos.initFileToPhoto(path + "UT-Austin-Tower.jpg", "UT Austin via Wikimedia Commons");
     Fixtures.loadModels("skinTemplates.yml"); // initial data for skin templates
     Fixtures.loadModels("initial-data.yml"); // rest of the data
     hashPasswords();
     initFriends();
   }
 }
Exemplo n.º 5
0
 public void doJob() {
   // Check if the database is empty
   if (Phrase.count() == 0) {
     Fixtures.load("initial-data.yml");
   }
 }
Exemplo n.º 6
0
 @Before
 public void setup() {
   Fixtures.deleteDatabase();
   Fixtures.loadModels("test_models_ver20130112.yml");
 }
Exemplo n.º 7
0
 @Before
 public void setUp() {
   Fixtures.deleteAll();
   Fixtures.load("fixtures.yml");
 }
Exemplo n.º 8
0
 @Before
 public void setup() {
   Fixtures.deleteDatabase();
   Fixtures.loadModels("data.yml");
 }
Exemplo n.º 9
0
 @Before
 public void setup() {
   Fixtures.deleteDatabase();
 }
Exemplo n.º 10
0
 @Before
 public void setUpData() {
   Fixtures.deleteAll();
   Fixtures.load("test-data.yml");
 }
 @Before
 public void setUp() {
   Fixtures.deleteAllModels();
   Fixtures.loadModels("data.yml");
 }
Exemplo n.º 12
0
 public void doJob() {
   // Check if the database is empty
   if (User.count() == 0) {
     Fixtures.loadModels("data.yml");
   }
 }