public void When_OccupationMatchInitialised_Then_PropertiesShouldHaveValues()
        {
            // Arrange


            // Act
            var x = new OccupationMatch()
            {
                JobProfileTitle         = "testValue",
                JobProfileUri           = "anotherTestValue",
                MatchingEssentialSkills = 1,
                MatchingOptionalSkills  = 2,
                LastModified            = DateTime.UtcNow,
                Uri = "testValue",
                TotalOccupationEssentialSkills = 3,
                TotalOccupationOptionalSkills  = 4,
            };

            // Assert
            x.JobProfileTitle.Should().Be("testValue");
            x.JobProfileUri.Should().Be("anotherTestValue");
            x.Uri.Should().Be("testValue");
            x.MatchingEssentialSkills.Should().Be(1);
            x.MatchingOptionalSkills.Should().Be(2);
            x.TotalOccupationEssentialSkills.Should().Be(3);
            x.TotalOccupationOptionalSkills.Should().Be(4);
            x.LastModified.Should().BeCloseTo(DateTime.UtcNow, new TimeSpan(0, 1, 0));
        }
Exemplo n.º 2
0
        public void When_SkillsExist_Then_MatchPercentageShouldBeCalculated()
        { // Arrange.
            var cm = new OccupationMatch();

            cm.MatchingEssentialSkills        = 1;
            cm.MatchingOptionalSkills         = 2;
            cm.TotalOccupationEssentialSkills = 10;
            cm.TotalOccupationOptionalSkills  = 3;

            // Act.
            var result = cm.MatchStrengthPercentage;

            // Assert.
            result.Should().Be(10, because: "we matched one skill out of ten essential skills");
        }