public void SetUp() { _auditMock = new Mock<IAudit>(); _queueWriter = new Mock<IQueueWriter>(); _sut = new RentalOfferController(_auditMock.Object, _queueWriter.Object); _post = CreateRentalOfferPost(); _result = _sut.Create(_post); }
public ActionResult Create(TenantRentalOffer offer) { try { //TODO add and check validation _audit.Audit(offer); _queueWriter.Enqueue(offer); TempData["info"] = "You offer has been submitted"; return RedirectToAction("Index", "Favourites"); } catch { return View(); } }