Ejemplo n.º 1
0
        public void AddBootcampSessionTest()
        {
            var beforeCount = repo.GetAllBootcampSessions().Count;

            repo.AddBootcampSession(mock.mockBootcampSession);
            var afterCount = repo.GetAllBootcampSessions().Count;

            Assert.AreEqual(beforeCount + 1, afterCount);
        }
 public HttpResponseMessage Post(BootcampSession session)
 {
     if (base.ModelState.IsValid)
     {
         _bootcampSessionRepo.AddBootcampSession(session);
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     return(base.Request.CreateErrorResponse(HttpStatusCode.BadRequest, base.ModelState));
 }