예제 #1
0
        public void PipelineComponentSettingNotFoundException_Test()
        {
            const string setting   = "TestSetting";
            var          component = new FooComponent();

            component.Initialize(component.GetType().Name, new Dictionary <string, string>());

            var target = new PipelineComponentSettingNotFoundException(component, setting);

            target.Should().NotBeNull();
            target.ThrowingComponent.Should().BeAssignableTo <FooComponent>();
            target.SettingName.Should().Be(setting);
            target.Message.Should().StartWith("Pipeline component named");
        }
예제 #2
0
        public void PipelineExecutionException_Properties_Test()
        {
            var component = new FooComponent();

            component.Initialize(component.GetType().Name, new Dictionary <string, string>());

            var exception = new ArgumentException("TestException");
            var target    = new PipelineExecutionException(component, exception);

            target.Should().NotBeNull();
            target.ThrowingComponent.Should().BeAssignableTo <FooComponent>();
            target.InnerException.Should().BeAssignableTo <ArgumentException>();
            target.InnerException?.Message.Should().Be("TestException");
            target.Message.Should().StartWith("Pipeline execution halted!");
        }