Ejemplo n.º 1
0
        public void TestThatTeamRatingIsAverageOfLatestAssessment()
        {
            CreateTeamWithMember();

            CreateAssessmentWithRetults(3, DateTime.Now, "Closed");

            Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = CreateAssessmentLogic();

            int rating = assessmentLogic.GetCurrentLevelForTeam();

            Assert.IsTrue(rating == 3, "Rating should be average of latest assessment.");
        }
Ejemplo n.º 2
0
        public void TestThatTeamRatingBasedOnLatestAssessment()
        {
            CreateTeamWithMember();

            CreateAssessmentWithRetults(5, DateTime.Now.Subtract(TimeSpan.FromDays(10)), "Closed");
            CreateAssessmentWithRetults(3, DateTime.Now, "Closed");

            Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = CreateAssessmentLogic();

            int rating = assessmentLogic.GetCurrentLevelForTeam();

            Assert.IsFalse(rating == 5, "The latest assessment must be used to generate the rating.");
        }