public async Task should_post_to_boas_api() { InstrumentServer(); var sut = new DisciplineSelectedHandler(); await sut.Handles(string.Empty, _message); Assert.AreEqual(1, _server.FindLogEntries(Request.Create().UsingPost()).Count()); }
public async Task should_call_boas_api() { InstrumentServer(); var sut = new DisciplineSelectedHandler(); await sut.Handles(string.Empty, _message); Assert.AreEqual(1, _server.LogEntries.Count()); }
public async Task should_post_payload_to_boas_api() { InstrumentServer(); var sut = new DisciplineSelectedHandler(); await sut.Handles(string.Empty, _message); var payload = new { ApplicationId = _message.ApplicationId, DsciplineId = _message.DisciplineId }; var body = JsonSerializer.Serialize(payload); var matcher = Request.Create() .UsingPost() .WithBody(body); Assert.AreEqual(1, _server.FindLogEntries(matcher).Count()); }