Examples of RiskLevel


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

       
        BusinessValue businessValue = new BusinessValueImpl();
        businessValue.setId(1);
        businessValue.setDescription("Hight");
       
        RiskLevel riskLevel = new RiskLevelImpl();
        riskLevel.setId(2);
        riskLevel.setDescription("Low");

        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

       
        BusinessValue businessValue = new BusinessValueImpl();
        businessValue.setId(1);
        businessValue.setDescription("Hight");
       
        RiskLevel riskLevel = new RiskLevelImpl();
        riskLevel.setId(2);
        riskLevel.setDescription("Low");

        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);
        EasyMock.expect(mockBusinessValueRepository.findById(1)).andReturn(businessValueOfTheStory);

        RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
        riskLevelOfTheStory.setId(2);
        EasyMock.expect(mockRiskLevelRepository.findById(2)).andReturn(riskLevelOfTheStory);

        //MockCore.endBlock();
       
        storyToUpdate.setBusinessValue(businessValueOfTheStory);
        storyToUpdate.setRiskLevel(riskLevelOfTheStory);

        // validation
        EasyMock.expect(mockStoryValidator.validate(EasyMock.isA(Story.class))).andReturn(errors);
       
        // enregistrement de la story dans la repository
        mockStoryRepository.addOrUpdate(storyToUpdate);
       
        // set mock in replay mode
        mocksControl.replay();

        // 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
        mocksControl.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;
       
        EasyMock.expect(mockStoryRepository.findByPersistanceId(1)).andReturn(story);
       
        // set mock in replay mode
        mocksControl.replay();
       
        // 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);
        EasyMock.expect(mockBusinessValueRepository.findById(1)).andReturn(businessValueOfTheStory);

        RiskLevel riskLevelOfTheStory = new RiskLevelImpl();
        riskLevelOfTheStory.setId(2);
        EasyMock.expect(mockRiskLevelRepository.findById(2)).andReturn(riskLevelOfTheStory);
       
        //MockCore.endBlock();

        // validation
        errors.reject("code");
        EasyMock.expect(mockStoryValidator.validate(EasyMock.isA(Story.class))).andReturn(errors);

        // set mock in replay mode
        mocksControl.replay();
       
        // 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
        mocksControl.verify();

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

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

     * <li>la description</li>
     * </ul>
     */
    public void testIsEqualsAndHashcodeWithDifferentDescriptions() {     
       
      RiskLevel riskLevel1 = new RiskLevelImpl();
      riskLevel1.setId(1);
      riskLevel1.setDescription("description");
     
      RiskLevel riskLevel2 = new RiskLevelImpl();
      riskLevel2.setId(1);
      riskLevel2.setDescription("scooby doo");
     
      assertFalse(riskLevel1.equals(riskLevel2));
      assertFalse(riskLevel1.hashCode() == riskLevel2.hashCode());
     
    }
View Full Code Here

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

     * <li>la description</li>
     * </ul>
     */
    public void testIsEqualsAndHashcodeWithSameDescriptions() {     
       
      RiskLevel riskLevel1 = new RiskLevelImpl();
      riskLevel1.setId(1);
      riskLevel1.setDescription("description");
     
      RiskLevel riskLevel2 = new RiskLevelImpl();
      riskLevel2.setId(2);
      riskLevel2.setDescription("description");
     
      assertTrue(riskLevel1.equals(riskLevel2));
      assertTrue(riskLevel1.hashCode() == riskLevel2.hashCode());
     
    }
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.