Ejemplo n.º 1
0
        public void Should_Update_Vacancy()
        {
            var createData = new { Title = "C# Developer", Description = "Preffered with side ruby history", OpenDate = DateTime.Now, CloseDate = DateTime.Now.AddMonths(1) };
            var updateData = new { Title = ".Net Developer", Description = "Preffered with side python history", OpenDate = DateTime.Now.AddMonths(1), CloseDate = DateTime.Now.AddMonths(3) };

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

            vacancy.UpdateTitle(updateData.Title);
            vacancy.UpdateDescription(updateData.Description);
            vacancy.UpdateCloseDate(updateData.CloseDate);
            vacancy.UpdateOpenDate(updateData.OpenDate);


            Assert.Equal(updateData.Title, vacancy.Title);
            Assert.Equal(updateData.Description, vacancy.Description);
            Assert.Equal(updateData.OpenDate, vacancy.OpenDate);
            Assert.Equal(updateData.CloseDate, vacancy.CloseDate);
            Assert.NotNull(vacancy.Requirements);
            Assert.Empty(vacancy.Requirements);
        }