예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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
            }
        }