public void Approved_customer_can_checkin_to_free_Roller() { _sut.Register("name", "phone"); _sut.Approve("A1B2C3", "1234"); var result = _sut.Checkin("1234", "abcd"); Assert.That(result, Is.TypeOf <OkResult>()); Assert.That(((OkResult)result).Id, Is.EqualTo("1234")); }
public RollerModule(Interactors interactors) { Get("/checkin/{id}", context => { var id = context.id; var rollerId = Request.Query["rollerid"]; var result = interactors.Checkin(id, rollerId); var json = FormatterExtensions.AsJson <Result>(Response, result); return(json); }); Get("/checkout/{id}", context => { var id = context.id; var rollerId = Request.Query["rollerid"]; var result = interactors.Checkout(id, rollerId); var json = FormatterExtensions.AsJson <Result>(Response, result); return(json); }); }