public void TestDefinedInterface() { var serviceCollection = new ServiceCollection(); var serviceRegistration = new TestServiceRegistration(); var busBuilder = new AsyncUseCaseBusBuilder(serviceRegistration); var bus = busBuilder.Build(); var request = new InputData(); bus.Handle(request); }
public void TestNormal() { var request = new InputData(); var serviceRegistration = new TestServiceRegistration(); var busBuilder = new AsyncUseCaseBusBuilder(serviceRegistration); busBuilder.RegisterUseCase <InputData, NormalInteractor>(); var bus = busBuilder.Build(); bus.Handle(request); }
public void TestThrowsException() { var serviceRegistration = new TestServiceRegistration(); var busBuilder = new AsyncUseCaseBusBuilder(serviceRegistration); busBuilder.RegisterUseCase <InputData, ThrowsExceptionInteractor>(); var bus = busBuilder.Build(); var request = new InputData(); try { bus.Handle(request); Assert.Fail(); } catch (Exception) { // ignored } }