PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Rhino.Etl.Tests/Fibonacci/Output/OutputFibonacciToDatabaseFromConnectionStringSettings.cs

http://github.com/ayende/rhino-etl
C# | 32 lines | 25 code | 4 blank | 3 comment | 2 complexity | 8178d9a57a1c26260c94068ccea5f6de MD5 | raw file
 1using System.Configuration;
 2
 3namespace Rhino.Etl.Tests.Fibonacci.Output
 4{
 5    using Core;
 6    using Errors;
 7
 8    public class OutputFibonacciToDatabaseFromConnectionStringSettings : EtlProcess
 9    {
10        private readonly int max;
11        private readonly Should should;
12        public readonly ThrowingOperation ThrowingOperation = new ThrowingOperation();
13        public readonly FibonacciOutput OutputOperation = new FibonacciOutput(ConfigurationManager.ConnectionStrings["Test"]);
14
15        public OutputFibonacciToDatabaseFromConnectionStringSettings(int max, Should should)
16        {
17            this.max = max;
18            this.should = should;
19        }
20
21        /// <summary>
22        /// Initializes this instance.
23        /// </summary>
24        protected override void Initialize()
25        {
26            Register(new FibonacciOperation(max));
27            if (should == Should.Throw)
28                Register(ThrowingOperation);
29            Register(OutputOperation);
30        }
31    }
32}