public async Task T_SendAsync_pathに一致するリクエストが見つからない場合は例外が発生する() { var serviceFactory = new ServiceFactory(_ => null); var client = new DefaultMediatorClient(new ServiceRegistry(), new ListenerRegistry(), serviceFactory, new InternalScopedServiceFactoryFactory(serviceFactory), new TestLogger()); Func<Task> act = () => client.SendAsync<Pong>("/path", new ServicePing()); await act.Should().ThrowAsync<InvalidOperationException>(); }
public async Task T_SendAsync_requestがnullの場合は例外が発生する() { var serviceFactory = new ServiceFactory(_ => null); var client = new DefaultMediatorClient(new ServiceRegistry(), new ListenerRegistry(), serviceFactory, new InternalScopedServiceFactoryFactory(serviceFactory), new TestLogger()); Func<Task> act = () => client.SendAsync<Pong>("/path", null); await act.Should().ThrowAsync<ArgumentNullException>(); }