public void Test_UpdateJob() { var data = new EfData(); var expected = data.GetJobs().Where(x => x.Id == data.GetJobs().Max(a => a.Id)).FirstOrDefault(); expected.EstimatedDuration = 33; expected.Hours = 50; expected.Complete = true; var actual = data.UpdateJob(expected); Assert.True(actual); }
public void TestJobUpdate() { var data = new EfData(); var u = data.GetJobs().Where(x => x.Id == data.GetJobs().Max(a => a.Id)).FirstOrDefault(); var u2 = JobMapper.MapToJobDAO(u); u2.Hours = 40; u2.Complete = true; var actual = UpdateJob(u2); Assert.True(actual); }
public List <JobDAO> GetJobs() { var s = new List <JobDAO>(); foreach (var job in ef.GetJobs()) { s.Add(JobMapper.MapToJobDAO(job)); } return(s); }
public void TestInsertJobExpense() { var data = new EfData(); var expe = data.GetExpenses().FirstOrDefault(); var jb = data.GetJobs().FirstOrDefault(); var result = data.AddJobExpense(jb, expe); Assert.True(result); }