Package org.universa.tcc.gemda.entidade

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


public class StoryDAOTest extends DAOTestCase {
 
  @Test
  public void testInserirStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Implementa��o da classes de persist�ncia, servi�o e testes de unidade!");
    storyDAO.inserir(story);
    assertNotNull(story.getId());
  }
View Full Code Here


    assertNotNull(story.getId());
  }
 
  @Test
  public void testAlterarStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Implementa��o da classes de persist�ncia, servi�o e testes de unidade!");
    storyDAO.inserir(story);
    assertNotNull(story.getId());
    story.setDescricao("Implementar a c�mada de interface de usu�rio!");
    storyDAO.alterar(story);
    Story storyAlterada = storyDAO.recuperar(story.getId());
    assertEquals("Implementar a c�mada de interface de usu�rio!", storyAlterada.getDescricao());
  }
View Full Code Here

    assertEquals("Implementar a c�mada de interface de usu�rio!", storyAlterada.getDescricao());
  }
 
  @Test
  public void testExcluirStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Implementa��o da classes de persist�ncia, servi�o e testes de unidade!");
    storyDAO.inserir(story);
    assertNotNull(story.getId());
    storyDAO.excluir(story);
    Story storyExcluida = storyDAO.recuperar(story.getId());
    assertNull(storyExcluida);
  }
View Full Code Here

    assertNull(storyExcluida);
  }
 
  @Test
  public void testRecuperarStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Teste!");
    storyDAO.inserir(story);
    assertNotNull(story.getId());
    Story storyRecuperada = storyDAO.recuperar(new Story(null, null, Prioridade.MEDIA, "Teste", null));
    assertNotNull(storyRecuperada);
  }
View Full Code Here

    assertFalse(stories.isEmpty());
  }
 
  @Test
  public void testPesquisarStories() throws Exception {
    Collection<Story> stories = storyDAO.pesquisar(new Story(null, null, Prioridade.MEDIA, null));
    assertFalse(stories.isEmpty());
  }
View Full Code Here

    assertNotNull(sprint.getId());
    return sprint;
  }
 
  protected Story criarStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.ALTA, "Criar teste da camada de servi�o!");
    facade.inserir(story);
    assertNotNull(story.getId());
    return story;
  }
View Full Code Here

  public void testAlterarTarefaInvalido() throws Exception {
    Tarefa tarefa = new Tarefa(null, "Teste", criarUsuario(), criarStory(), Passo.TO_DO);
    facade.inserir(tarefa);
    assertNotNull(tarefa.getId());
    tarefa.setUsuario(new Usuario());
    tarefa.setStory(new Story());
    tarefa.setDescricao("");
    tarefa.setPasso(null);
    facade.alterar(tarefa);
    Tarefa tarefaAlterada = facade.recuperar(Tarefa.class, tarefa.getId());
    assertEquals(Passo.DOING, tarefaAlterada.getPasso());
View Full Code Here

public class StoryServiceTest extends ServiceTestCase {
 
  public void testInserirStoryInvalido() throws Exception {
    try {
      Story story = new Story();
      storyService.inserir(story);
      assertNotNull(story.getId());
    } catch (ValidationException e) {
      throwValidations(e);
    }
  }
View Full Code Here

    }
  }

  @Test
  public void testInserirStory() throws Exception {
    Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Implementa��o da classes de persist�ncia, servi�o e testes de unidade!");
    storyService.inserir(story);
    assertNotNull(story.getId());
  }
View Full Code Here

    assertNotNull(story.getId());
  }
 
  public void testAlterarStoryInvalido() throws Exception {
    try {
      Story story = new Story(null, criarSprint(), Prioridade.MEDIA, "Implementa��o da classes de persist�ncia, servi�o e testes de unidade!");
      storyService.inserir(story);
      assertNotNull(story.getId());
      story.setSprint(new Sprint());
      story.setDescricao("0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
          "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
          "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
          "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
          "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
          "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" +
View Full Code Here

TOP

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

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.