Package org.universa.tcc.gemda.entidade

Examples of org.universa.tcc.gemda.entidade.Sprint


  }
 
  public void testRecuperadoSprintInvalido() throws Exception {
    Date dataInicio = new SimpleDateFormat("dd/MM/yyyy").parse("01/01/2010");
    Date dataFim = new SimpleDateFormat("dd/MM/yyyy").parse("01/04/2010");
    Sprint sprint = new Sprint(null, criarProjeto(), dataInicio, dataFim);
    facade.inserir(sprint);
    assertNotNull(sprint.getId());
    Sprint sprintRecuperado = facade.recuperar(Sprint.class, null);
    assertNotNull(sprintRecuperado);
  }
View Full Code Here


 
  @Test
  public void testRecuperadoSprint() throws Exception {
    Date dataInicio = new SimpleDateFormat("dd/MM/yyyy").parse("01/01/2010");
    Date dataFim = new SimpleDateFormat("dd/MM/yyyy").parse("01/04/2010");
    Sprint sprint = new Sprint(null, criarProjeto(), dataInicio, dataFim);
    facade.inserir(sprint);
    assertNotNull(sprint.getId());
    Sprint sprintRecuperado = facade.recuperar(Sprint.class, sprint.getId());
    assertNotNull(sprintRecuperado);
  }
View Full Code Here

    assertFalse(sprints.isEmpty());
  }

  @Test
  public void testPesquisarSprints() throws Exception {
    Sprint sprint = new Sprint();
    sprint.setProjeto(facade.recuperar(new Projeto(null, null, "gemda", null, null, null)));
    Collection<Sprint> sprints = facade.pesquisar(sprint);
    assertFalse(sprints.isEmpty());
  }
View Full Code Here

    assertFalse(count == 0);
  }
 
  @Test
  public void testCountSprint() throws Exception {
    long count = facade.count(new Sprint(null, null, null, new Date()));
    assertFalse(count == 0);
  }
View Full Code Here

    assertNotNull(projeto.getId());
    return projeto;
  }
 
  protected Sprint criarSprint() throws Exception {
    Sprint sprint = new Sprint(null, criarProjeto(), new Date(), new Date());
    facade.inserir(sprint);
    assertNotNull(sprint.getId());
    return sprint;
  }
View Full Code Here

public class SprintServiceTest extends ServiceTestCase {
 
  public void testInserirSprintInvalido() throws Exception {
    try {
      Sprint sprint = new Sprint();
      sprintService.inserir(sprint);
      assertNotNull(sprint.getId());
    } catch (ValidationException e) {
      throwValidations(e);
    }
  }
View Full Code Here

    }
  }

  @Test
  public void testInserirSprint() throws Exception {
    Sprint sprint = new Sprint(null, criarProjeto(), new Date(), new Date());
    sprintService.inserir(sprint);
    assertNotNull(sprint.getId());
  }
View Full Code Here

    assertNotNull(sprint.getId());
  }
 
  public void testAlterarSprintInvalido() throws Exception {
    try {
      Sprint sprint = new Sprint(null, criarProjeto(), new Date(), new Date());
      sprintService.inserir(sprint);
      assertNotNull(sprint.getId());
      sprint.setProjeto(new Projeto());
      sprint.setDataInicio(null);
      sprint.setDataFim(null);
      sprintService.alterar(sprint);
    } catch (ValidationException e) {
      throwValidations(e);
    }
  }
View Full Code Here

    }
  }
 
  @Test
  public void testAlterarSprint() throws Exception {
    Sprint sprint = new Sprint(null, criarProjeto(), new Date(), new Date());
    sprintService.inserir(sprint);
    assertNotNull(sprint.getId());
    Date dataInicio = new SimpleDateFormat("dd/MM/yyyy").parse("01/01/2010");
    sprint.setDataInicio(dataInicio);
    sprintService.alterar(sprint);
    Sprint sprintAlterado = sprintService.recuperar(sprint.getId());
    assertEquals(dataInicio, sprintAlterado.getDataInicio());
  }
View Full Code Here

    assertEquals(dataInicio, sprintAlterado.getDataInicio());
  }
 
  public void testExcluirSprintInvalido() throws Exception {
    try {
      Sprint sprint = new Sprint(null, criarProjeto(), new Date(), new Date());
      sprintService.inserir(sprint);
      assertNotNull(sprint.getId());
      sprint.setId(null);
      sprintService.excluir(sprint);
    } catch (ValidationException e) {
      throwValidations(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.universa.tcc.gemda.entidade.Sprint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.