public void TestDefaults() { var plan = new PlanDto(); Assert.That(plan.Executable, Is.Null); Assert.That(plan.Assembly, Is.Null); Assert.That(plan.Run, Is.Null); Assert.That(plan.ID, Is.Null); }
public HttpResponseMessage PostPlan(PlanDto plandto) { var plan = mMapper.Map<Plan>(plandto); mRepo.Add(plan); plandto = mMapper.Map<PlanDto>(plan); var response = Request.CreateResponse(HttpStatusCode.Created, plandto); response.Headers.Location = new Uri(Url.Link("defaultapi", new {id = plandto.ID})); return response; }
public void PutPlan(PlanDto plandto) { mRepo.Update(mMapper.Map<Plan>(plandto)); }