Пример #1
0
        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());
        }
Пример #2
0
        public async Task should_call_boas_api()
        {
            InstrumentServer();

            var sut = new DisciplineSelectedHandler();
            await sut.Handles(string.Empty, _message);

            Assert.AreEqual(1, _server.LogEntries.Count());
        }
Пример #3
0
        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());
        }