public async Task Process_KnownParameters_Processed()
        {
            Mocks mocks = new Mocks();
            Mock<IParameterProcessor> keyAProcessor = new Mock<IParameterProcessor>();
            Mock<IParameterProcessor> keyBProcessor = new Mock<IParameterProcessor>();

            ParameterProcessorMap map = new ParameterProcessorMap();
            map.SetProcessor("keya", keyAProcessor.Object);
            map.SetProcessor("keyb", keyBProcessor.Object);

            await map.ProcessAsync(mocks.Connection.Object, new string[] { "KEYA=VALUEA", "KEYB=VALUEB" }, true);

            keyAProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYA", "VALUEA"));
            keyBProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYB", "VALUEB"));
        }
        public void Process_KnownParameters_Processed()
        {
            Mocks mocks = new Mocks();
            Mock <IParameterProcessor> keyAProcessor = new Mock <IParameterProcessor>();
            Mock <IParameterProcessor> keyBProcessor = new Mock <IParameterProcessor>();

            ParameterProcessorMap map = new ParameterProcessorMap();

            map.SetProcessor("keya", keyAProcessor.Object);
            map.SetProcessor("keyb", keyBProcessor.Object);

            map.Process(mocks.Connection.Object, new string[] { "KEYA=VALUEA", "KEYB=VALUEB" }, true);

            keyAProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYA", "VALUEA"));
            keyBProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYB", "VALUEB"));
        }
        public async Task Process_KnownParameters_Processed()
        {
            var mocks         = new Mocks();
            var keyAProcessor = new Mock <IParameterProcessor>();
            var keyBProcessor = new Mock <IParameterProcessor>();

            var map = new ParameterProcessorMap();

            map.SetProcessor("keya", keyAProcessor.Object);
            map.SetProcessor("keyb", keyBProcessor.Object);

            await map.ProcessAsync(mocks.Connection.Object, new string[] { "KEYA=VALUEA", "KEYB=VALUEB" }, true);

            keyAProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYA", "VALUEA"));
            keyBProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYB", "VALUEB"));
        }
        public async Task Process_KnownParameters_Processed()
        {
            TestMocks mocks = new TestMocks();
            Mock <IParameterProcessor> keyAProcessor = new Mock <IParameterProcessor>();
            Mock <IParameterProcessor> keyBProcessor = new Mock <IParameterProcessor>();

            ParameterProcessorMap map = new ParameterProcessorMap();

            map.SetProcessor("keya", keyAProcessor.Object);
            map.SetProcessor("keyb", keyBProcessor.Object);

            await map.Process(mocks.Connection.Object, new string[] { "KEYA=VALUEA", "KEYB=VALUEB" }, true).ConfigureAwait(false);

            keyAProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYA", "VALUEA"));
            keyBProcessor.Verify(p => p.SetParameter(mocks.Connection.Object, "KEYB", "VALUEB"));
        }
        public void GetProcessor_RegisteredDifferentCase_Returned()
        {
            Mock<IParameterProcessor> processor = new Mock<IParameterProcessor>();

            ParameterProcessorMap map = new ParameterProcessorMap();
            map.SetProcessor("blah", processor.Object);

            Assert.Same(processor.Object, map.GetProcessor("BLAH"));
        }
        public void GetProcessor_RegisteredDifferentCase_Returned()
        {
            Mock <IParameterProcessor> processor = new Mock <IParameterProcessor>();

            ParameterProcessorMap map = new ParameterProcessorMap();

            map.SetProcessor("blah", processor.Object);

            Assert.AreSame(processor.Object, map.GetProcessor("BLAH"));
        }
        public void GetProcessor_Registered_Returned()
        {
            var processor = new Mock <IParameterProcessor>();

            var map = new ParameterProcessorMap();

            map.SetProcessor("BLAH", processor.Object);

            Assert.Same(processor.Object, map.GetProcessor("BLAH"));
        }