예제 #1
0
 @Test
 public void findOneApp() {
   App app = new App();
   app.setUser(user);
   user.getUserApps().add(app);
   app.setAppName("Teste");
   app.setVersion("0.1");
   app.setiOSTheme(false);
   Assert.assertEquals(0, this.appDao.findAll().size());
   app = this.appDao.create(app);
   Assert.assertEquals(1, this.appDao.findAll().size());
 }
예제 #2
0
 @Test
 public void createAppWithEmailUs() {
   App app = new App();
   app.setUser(user);
   user.getUserApps().add(app);
   app.setAppName("Teste");
   app.setVersion("0.1");
   EmailUs email = new EmailUs();
   email.setEmail("email");
   email.setApp(app);
   List<Function> function = new ArrayList<Function>();
   function.add(email);
   app.setAppFunctions(function);
   app.setiOSTheme(false);
   app = this.appDao.create(app);
   Assert.assertEquals(app, this.appDao.findById(app.getId()));
 }