Examples of RiskLevel


Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

    /**
     * Test quand le RiskLevel est trouv�e.
     */
    public final void testFindByIdWhenRiskLevelIsFound() {
       
        RiskLevel riskLevel = riskLevelMapper.findById(2);
       
        assertNotNull(riskLevel);
        assertEquals(2, riskLevel.getId());
        assertEquals("MEDIUM", riskLevel.getDescription());
       
    }
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

     * Test quand le RiskLevel n'est pas trouv�.
     * La m�thode doit retourner null.
     */
    public final void testFindByIdWhenRiskLevelIsNotFound() {
       
        RiskLevel riskLevel = riskLevelMapper.findById(999);
       
        assertNull(riskLevel);
       
    }
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        // find the riskLevel and business value
        BusinessValue businessValue = businessValueRepository.findById(businessValueId);
        story.setBusinessValue(businessValue);

        RiskLevel riskLevel = riskLevelRepository.findById(riskLevelId);
        story.setRiskLevel(riskLevel);

        // validate
        Errors errors = storyValidator.validate(story);
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        // find the riskLevel and business value
        BusinessValue businessValue = businessValueRepository.findById(businessValueId);
        story.setBusinessValue(businessValue);

        RiskLevel riskLevel = riskLevelRepository.findById(riskLevelId);
        story.setRiskLevel(riskLevel);

        return story;

    }
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        Story story = new StoryImpl();
       
        BusinessValue businessValue = new BusinessValueImpl();
        businessValue.setId(1);
       
        RiskLevel riskLevel = new RiskLevelImpl();
        riskLevel.setId(2);

        story.setPersistanceId(1);
        story.setBusinessValue(businessValue);
        story.setRiskLevel(riskLevel);
       
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        Story story = new StoryImpl();
       
        BusinessValue businessValue = new BusinessValueImpl();
        businessValue.setId(1);
       
        RiskLevel riskLevel = new RiskLevelImpl();
        riskLevel.setId(2);

        story.setPersistanceId(1);
        story.setBusinessValue(businessValue);
        story.setRiskLevel(riskLevel);
       
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        // recherche des business value et risk level
        BusinessValue businessValueOfTheStory = new BusinessValueImpl();
        businessValueOfTheStory.setId(1);
        mockBusinessValueRepository.expectFindById(1, businessValueOfTheStory);

        RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
        riskLevelOfTheStory.setId(2);
        mockRiskLevelRepository.expectFindById(2, riskLevelOfTheStory);      
        MockCore.endBlock();
       
        storyToUpdate.setBusinessValue(businessValueOfTheStory);
        storyToUpdate.setRiskLevel(riskLevelOfTheStory);
       

        // validation
        mockStoryValidator.expectValidate(new Ignore(), errors);

        // enregistrement de la story dans la repository
        mockStoryRepository.expectAddOrUpdate(storyToUpdate);

        // appel de la m�thode de mise � jour
        Errors errorsFromService = storyService.update(shortDescription, description, daysestimated, businessValueOfTheStory.getId(), riskLevelOfTheStory.getId(),persistanceId, persistanceVersion);

        // V�rifie les appels
        MockCore.verify();

        // aucune erreur n'est retourn�e (car pas de validation)
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        int persistanceVersion = 5;

        BusinessValue businessValueOfTheStory = new BusinessValueImpl();
        businessValueOfTheStory.setId(1);

        RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
        riskLevelOfTheStory.setId(2);

     
        // recherche de la story
        Story story =  null;
        mockStoryRepository.expectFindByPersistanceId(1, story);
       
        // Appel au service
        Errors errorsFromService = storyService.update(shortDescription, description, daysestimated, businessValueOfTheStory.getId(), riskLevelOfTheStory.getId(),persistanceId, persistanceVersion);
       
        // contrôle de l'erreur retournée
        assertTrue(errorsFromService.hasGlobalErrors());
        // message en Français
        assertEquals("Cette story n'existe pas en base de données", errorsFromService.getGlobalError(Locale.FRENCH));
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        // recherche des business value et risk level
        BusinessValue businessValueOfTheStory = new BusinessValueImpl();
        businessValueOfTheStory.setId(1);
        mockBusinessValueRepository.expectFindById(1, businessValueOfTheStory);

        RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
        riskLevelOfTheStory.setId(2);
        mockRiskLevelRepository.expectFindById(2, riskLevelOfTheStory);      
        MockCore.endBlock();


        // validation
        errors.reject("code");
        mockStoryValidator.expectValidate(new Ignore(), errors);

        // appel de la m�thode de mise � jour
        Errors errorsFromService = storyService.update(shortDescription, description, estimate, businessValueOfTheStory.getId(), riskLevelOfTheStory.getId(), persistanceId, persistanceVersion);

        // V�rifie les appels
        MockCore.verify();

        // aucune erreur n'est retourn�e (car pas de validation)
View Full Code Here

Examples of net.sf.pmr.agilePlanning.domain.story.RiskLevel

        // find the riskLevel and business value
        BusinessValue businessValue = businessValueRepository.findById(businessValueId);
        story.setBusinessValue(businessValue);

        RiskLevel riskLevel = riskLevelRepository.findById(riskLevelId);
        story.setRiskLevel(riskLevel);

        // validate
        Errors errors = storyValidator.validate(story);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.