public void Convert_To_Test() { //see if all properties are changed simpleJob sj = new simpleJob(); sj.ActualStartDate = DateTime.Now.AddDays(-0.5); sj.ActualEndDate = DateTime.Now.AddDays(-1); //see if only passes properties are changed JarsJob job = FakeDataHelper.FakeJarsJobs[0]; job.LabelKey = "6"; job.StatusKey = "6"; sj = job.ConvertTo(sj); Assert.IsTrue(job.ActualStartDate == sj.ActualStartDate); }
public void Populate_With_Test() { simpleJob sj = new simpleJob(); sj.ActualStartDate = DateTime.Now.AddDays(-0.8); sj.ActualEndDate = DateTime.Now.AddDays(-1); //see if only passes properties are changed JarsJob job = FakeDataHelper.FakeJarsJobs[0]; job.LabelKey = "6"; job.Priority = "10"; job = job.PopulateWith(sj); Assert.IsTrue(job.ActualStartDate == sj.ActualStartDate); }