public void FunctionHandlerAsync_stops_bus(TestFunctionWithNoHandler sut, string payload, ILambdaContext context) { Assert.ThrowsAsync <InvalidOperationException>(() => sut.FunctionHandlerAsync(payload, context)); Mock.Get(sut.BusHost).Verify(p => p.StopAsync()); }
public void FunctionHandlerAsync_throws_if_no_handler_is_registered(TestFunctionWithNoHandler sut, string payload, ILambdaContext context) { Assert.ThrowsAsync <InvalidOperationException>(() => sut.FunctionHandlerAsync(payload, context)); }
public void TestFunctionWithNoHandler_is_set_up(TestFunctionWithNoHandler sut) { Assert.That(sut.BusHost, Is.Not.Null); }