public void FetchComponentFromComponentList()
        {
            var component = new FailedMessageRoutingEnablerComponent();
            var list      = new ComponentList(new Stage(StageCategory.Decoder.Id, PolicyFile.BTSReceivePolicy.Value))
            {
                component
            };

            list.Component <FailedMessageRoutingEnablerComponent>().Should().BeSameAs(component);
        }
Beispiel #2
0
        public void FetchComponentFromComponentList()
        {
            var component = new FailedMessageRoutingEnablerComponent();
            var list      = new ComponentList(new Stage(StageCategory.Decoder.Id))
            {
                component
            };

            Assert.That(list.Component <FailedMessageRoutingEnablerComponent>(), Is.SameAs(component));
        }
        public void FetchUnregisteredComponentFromComponentListThrows()
        {
            var list = new ComponentList(new Stage(StageCategory.Decoder.Id, PolicyFile.BTSReceivePolicy.Value))
            {
                new FailedMessageRoutingEnablerComponent()
            };

            Action(() => list.Component <PartyRes>()).Should()
            .Throw <InvalidOperationException>()
            .WithMessage("Sequence contains no elements");
        }
Beispiel #4
0
        public void FetchUnregisteredComponentFromComponentListThrows()
        {
            var list = new ComponentList(new Stage(StageCategory.Decoder.Id))
            {
                new FailedMessageRoutingEnablerComponent()
            };

            Assert.That(
                () => list.Component <PartyRes>(),
                Throws.InvalidOperationException.With.Message.EqualTo("Sequence contains no elements"));
        }