コード例 #1
0
 public void SetUp()
 {
     _context    = Substitute.For <IOrangeBricksContext>();
     _properties = Substitute.For <IDbSet <Models.Property> >();
     _handler    = new MakeViewingAppointmentCommandHandler(_context);
     _context.Properties.Returns(_properties);
 }
コード例 #2
0
        public ActionResult MakeViewingAppointment(MakeViewingAppointmentCommand command)
        {
            var handler = new MakeViewingAppointmentCommandHandler(_context);

            command.BuyerUserId = User.Identity.GetUserId();

            handler.Handle(command);

            return(RedirectToAction("Index"));
        }