示例#1
0
        public void SkillScore_DummyRatingAdded_ReturnsRatingValue()
        {
            var expectedScore = 1.0d;
            var skillLevel    = new SkillLevel();

            skillLevel.SetRating(new DummyRating()
            {
                Score = expectedScore
            });

            var skillScore = skillLevel.SkillScore;

            Assert.Equal(expectedScore, skillScore);
        }
示例#2
0
        public void CompareTo_SecondBetterThanFirst_ReturnsPositiveValue()
        {
            var firstSkillLevel = new SkillLevel();

            firstSkillLevel.SetRating(new DummyRating()
            {
                Score = 0.5d
            });
            var secondSkillLevel = new SkillLevel();

            secondSkillLevel.SetRating(new DummyRating()
            {
                Score = 1.0d
            });

            var comparisonResult = firstSkillLevel.CompareTo(secondSkillLevel);

            Assert.True(comparisonResult > 0.0d);
        }
示例#3
0
        public void CompareTo_SameScore_ReturnsZero()
        {
            var firstSkillLevel = new SkillLevel();

            firstSkillLevel.SetRating(new DummyRating()
            {
                Score = 1.0d
            });
            var secondSkillLevel = new SkillLevel();

            secondSkillLevel.SetRating(new DummyRating()
            {
                Score = 1.0d
            });

            var comparisonResult = firstSkillLevel.CompareTo(secondSkillLevel);

            Assert.Equal(0.0d, comparisonResult);
        }