public void ConstructScoreWithValidParams() { float? scaledScore = 0.3f; var score = new Score(0, 50, 15, scaledScore); Assert.AreEqual(scaledScore, score.ScaledScore); }
public AttemptResult(long attemptId, User user, Theme theme, CompletionStatus completionStatus, AttemptStatus attemptStatus, SuccessStatus successStatus, DateTime? startTime, float? scaledScore) { this.AttemptId = attemptId; this.User = user; this.Theme = theme; this.CompletionStatus = completionStatus; this.AttemptStatus = attemptStatus; this.SuccessStatus = successStatus; this.StartTime = startTime; this.Score = new Score(scaledScore); }
public AttemptResult(long attemptId, User user, CurriculumChapterTopic curriculumChapterTopic, TopicTypeEnum topicType, CompletionStatus completionStatus, AttemptStatus attemptStatus, SuccessStatus successStatus, DateTime? startTime, DateTime? finishTime, int iudicoCourseRef, float? minScore, float? maxScore, float? rawScore, float? scaledScore) { this.AttemptId = attemptId; this.User = user; this.CurriculumChapterTopic = curriculumChapterTopic; this.TopicType = topicType; this.CompletionStatus = completionStatus; this.AttemptStatus = attemptStatus; this.SuccessStatus = successStatus; this.StartTime = startTime; this.FinishTime = finishTime; this.IudicoCourseRef = iudicoCourseRef; this.Score = new Score(minScore, maxScore, rawScore, scaledScore); }
public void TestToPercentsMethod() { var score = new Score(0, 50, 32.5F, 0.65f); Assert.AreEqual(65, score.ToPercents()); }