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

            var assessmentResults = new List <Continuum.Data.AssessmentResult>();

            _mockContainer.Assessments.Add(new Data.Assessment()
            {
                DateCreated       = DateTime.Now,
                AssessmentResults = assessmentResults,
                Status            = new Data.AssessmentStatus()
                {
                    Value = "Closed"
                }
            });

            var identity  = new System.Security.Principal.GenericIdentity("TestUser");
            var principal = new System.Security.Principal.GenericPrincipal(identity, new string[] { });

            Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = new WebApi.Logic.AssessmentLogic(_assessmentRepo, _teamRepository, _dimensionRepo, principal);

            int rating = assessmentLogic.GetCurrentLevelForTeam();

            Assert.IsTrue(rating == 1, "Rating must be 1 if there is not assessment info.");
        }
Ejemplo n.º 2
0
        public void TestThatTeamWithNoAssessmentsHasDefaultRating()
        {
            CreateTeamWithMember();

            var identity  = new System.Security.Principal.GenericIdentity("TestUser");
            var principal = new System.Security.Principal.GenericPrincipal(identity, new string[] { });

            Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = new WebApi.Logic.AssessmentLogic(_assessmentRepo, _teamRepository, _dimensionRepo, principal);

            int rating = assessmentLogic.GetCurrentLevelForTeam();

            Assert.IsTrue(rating == 1, "Rating must be 1 if there is not assessment info.");
        }
Ejemplo n.º 3
0
        public void TestThatTeamWithNoAssessmentsHasDefaultRating()
        {
            CreateTeamWithMember();

               var identity = new System.Security.Principal.GenericIdentity("TestUser");
               var principal = new System.Security.Principal.GenericPrincipal(identity, new string[] { });

               Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = new WebApi.Logic.AssessmentLogic(_assessmentRepo, _teamRepository, _dimensionRepo, principal);

               int rating = assessmentLogic.GetCurrentLevelForTeam();

               Assert.IsTrue(rating == 1, "Rating must be 1 if there is not assessment info.");
        }
Ejemplo n.º 4
0
        public void TestThatTeamWithNoAssessmentResultsGetsDefaultRating()
        {
            CreateTeamWithMember();

            var assessmentResults = new List<Continuum.Data.AssessmentResult>();

            _mockContainer.Assessments.Add(new Data.Assessment()
            {
                DateCreated = DateTime.Now,
                AssessmentResults = assessmentResults,
                Status = new Data.AssessmentStatus() { Value = "Closed" }
            });

            var identity = new System.Security.Principal.GenericIdentity("TestUser");
            var principal = new System.Security.Principal.GenericPrincipal(identity, new string[] { });

            Continuum.WebApi.Logic.AssessmentLogic assessmentLogic = new WebApi.Logic.AssessmentLogic(_assessmentRepo, _teamRepository, _dimensionRepo, principal);

            int rating = assessmentLogic.GetCurrentLevelForTeam();

            Assert.IsTrue(rating == 1, "Rating must be 1 if there is not assessment info.");
        }