コード例 #1
0
        public void Should_Remove_Requirement()
        {
            var vacancyData     = new { Title = "C# Developer", Description = "Preffered with side ruby history", OpenDate = DateTime.Now, CloseDate = DateTime.Now.AddMonths(1) };
            var requirementData = new { SkillType = SkillType.Technical, RequirementType = RequirementType.NiceToHave, Content = "Python" };

            var vacancy = new Vacancy(vacancyData.Title, vacancyData.Description, vacancyData.OpenDate, vacancyData.CloseDate);

            vacancy.AddRequirement(new Requirement(requirementData.Content, requirementData.SkillType, requirementData.RequirementType));

            var requirement = vacancy.Requirements.FirstOrDefault();

            vacancy.RemoveRequirement(requirement);

            Assert.NotNull(requirement);
            Assert.Empty(vacancy.Requirements);
        }