示例#1
0
        public RecipientRunnerTests()
        {
            var registry = new TypeInspectorRegistry();

            _recipient                = InstanceRecipient.Create(registry, new SomeType(), name: null, IgnoreRecipient);
            _faultingRecipient        = InstanceRecipient.Create(registry, new SomeFaultingType(), name: null, IgnoreRecipient);
            _anotherFaultingRecipient = InstanceRecipient.Create(registry, new SomeComplexFaultingType(), name: null, IgnoreRecipient);
        }
示例#2
0
        public AggregatedResponseExtensionsTests()
        {
            var registry = new TypeInspectorRegistry();

            var someRecipient = InstanceRecipient.Create(registry, new SomeType(), name: null, IgnoreRecipient);
            var someRunners   = someRecipient.Accept(42);
            var aRunner       = someRunners[0];

            aRunner.Start().Wait();

            var someFaultingRecipient = InstanceRecipient.Create(registry, new SomeFaultingType(), name: null, IgnoreRecipient);
            var someFaultingRunners   = someFaultingRecipient.Accept(42);
            var aFaultingRunner       = someFaultingRunners[0];

            aFaultingRunner.Start().Wait();

            var someNeverEndingRecipient = InstanceRecipient.Create(registry, new SomeNeverEndingType(), name: null, IgnoreRecipient);
            var someNeverEndingRunners   = someNeverEndingRecipient.Accept(42);
            var aNeverEndingRunner       = someNeverEndingRunners[0];

            aNeverEndingRunner.Start();

            _runners = new[] { aRunner, aFaultingRunner, aNeverEndingRunner };
        }