public void SetUp() { _context = Substitute.For <IOrangeBricksContext>(); _properties = Substitute.For <IDbSet <Models.Property> >(); _handler = new MakeViewingAppointmentCommandHandler(_context); _context.Properties.Returns(_properties); }
public ActionResult MakeViewingAppointment(MakeViewingAppointmentCommand command) { var handler = new MakeViewingAppointmentCommandHandler(_context); command.BuyerUserId = User.Identity.GetUserId(); handler.Handle(command); return(RedirectToAction("Index")); }