Package net.sf.pmr.agilePlanning.domain.release

Examples of net.sf.pmr.agilePlanning.domain.release.ReleaseImpl


     * <li>retour d'une erreur dans la structure d'erreur</li>
     * </ul>
     */
    public void testUpdateWhenValidationFails() {

        Release release = new ReleaseImpl();

        Project project = new ProjectImpl();
        Date date = new Date();
        String number = "2";
        int persistanceId = 1;
        long persistanceVersion = 3;
        release.setProject(project);

        errors.reject("erreur");

        // recherche
        EasyMock.expect(mockReleaseRepository.findByPersistanceId(persistanceId)).andReturn(release);
       
        // validation
        EasyMock.expect(mockReleaseValidator.validate(release)).andReturn(errors);

        mocksControl.replay();
       
        Errors errorsFromService = releaseService.update(number, date, persistanceId, persistanceVersion);

        // Vérifie les appels
        mocksControl.verify();

        // une erreur est retournée.
        assertTrue(errorsFromService.hasErrors());

        // vérifie la mise à jour
        assertEquals(release.getNumber(), number);
        assertSame(release.getProject(), project);
        assertEquals(release.getDate(), date);
        assertEquals(release.getPersistanceId(), persistanceId);
        assertEquals(release.getPersistanceVersion(), persistanceVersion);

    }
View Full Code Here


     * </ul>
     */
    public void testFindByPersistanceIdWhenIterationIsFound() {

        int persistanceId = 1;
        Release release = new ReleaseImpl();

        EasyMock.expect(mockReleaseRepository.findByPersistanceId(persistanceId)).andReturn(release);
       
        mocksControl.replay();
       
View Full Code Here

     */
    public void testFindByProjectPersistanceIdWhenIterationsAreFound() {

        int projetPersistanceId = 1;
        Set<Release> set = new HashSet<Release>();
        Release release = new ReleaseImpl();
        set.add(release);

        EasyMock.expect(mockReleaseRepository.findByProjectPersistanceId(projetPersistanceId)).andReturn(set);

        mocksControl.replay();
View Full Code Here

       
        // populate the release list box
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
        Set<Release> releases = releaseService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue());
        // Ajout d'un ligne vide
        Release release = new ReleaseImpl();
        release.setProject(null);
        release.setDate(null);
        release.setNumber("-");
        release.setPersistanceId(0);
        release.setPersistanceVersion(0);
        releases.add(release);
       
        request.setAttribute("releases", releases);
             
        // populate summary
View Full Code Here

       
        // populate the release list box
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
        Set<Release> releases = releaseService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue());
        // Ajout d'un ligne vide
        Release release = new ReleaseImpl();
        release.setProject(null);
        release.setDate(null);
        release.setNumber("-");
        release.setPersistanceId(0);
        release.setPersistanceVersion(0);
        releases.add(release);
       
        request.setAttribute("releases", releases);
             
        // populate summary
View Full Code Here

TOP

Related Classes of net.sf.pmr.agilePlanning.domain.release.ReleaseImpl

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.