public void AssesHandinTest() { // Arrange: This function list of members in a handin, bool lateHandin and string reason var startingRiskfactor = 33.33; List <string> members = new List <string>(); var lateHandin = true; var reason = "totally testing this out"; members.Add(MockFactory.SSN_OTTAR); members.Add(MockFactory.SSN_KJARTAN); members.Add(MockFactory.SSN_KEVIN); // Act: All students have RiskFactor = 33.33 after running Handin func // The riskfactor should lower down for 3 of them since its good to handin // how ever 1 student SSN_INGOLFUR should stay at 33.33 _assessmentService.AssessHandin(members, lateHandin, reason); var student1Check = _studentService.GetStudentFunc(MockFactory.SSN_OTTAR); var student2Check = _studentService.GetStudentFunc(MockFactory.SSN_KJARTAN); var student3Check = _studentService.GetStudentFunc(MockFactory.SSN_KEVIN); var student4Check = _studentService.GetStudentFunc(MockFactory.SSN_INGOLFUR); // Assert: Riskfactor should have lowered by 1 since Comment is set to value 1 .. app.cfg Assert.IsTrue(student1Check.RiskFactor < startingRiskfactor); Assert.IsTrue(student2Check.RiskFactor < startingRiskfactor); Assert.IsTrue(student3Check.RiskFactor < startingRiskfactor); Assert.IsFalse(student4Check.RiskFactor < startingRiskfactor); }