public void Should_resolve_multiple_consumer()
        {
            var consumer = new MultipleMessageConsumer();

            sut.Register(consumer);

            Assert.Contains(sut.Resolve(typeof(MyMessage)), consumer);
            Assert.Contains(sut.Resolve(typeof(MyOtherMessage)), consumer);
        }
Esempio n. 2
0
        public void Should_resolve_multiple_consumer()
        {
            var consumer = new MultipleMessageConsumer();

            container.Register(Component.For(typeof(IConsumer <MyMessage>), typeof(IConsumer1 <MyOtherMessage>)).Instance(consumer));

            Assert.Contains(sut.Resolve(typeof(MyMessage)), consumer);
            Assert.Contains(sut.Resolve(typeof(MyOtherMessage)), consumer);
        }