public void AttributeHandlerMapBinderContextHandlerTest()
        {
            var binder  = new AttributeHandlerMapBinder();
            var handler = new ContextHandler();
            var map     = new Dictionary <string, string> {
                { "{ctx}", "ContextTest1" }
            };

            binder.Bind(map, handler);

            Assert.AreEqual("ContextTest1", handler.Context);
        }
        public void AttributeHandlerMapBinderThrowsMapKeyNotFoundMapBinderException()
        {
            var binder  = new AttributeHandlerMapBinder();
            var handler = new ContextHandler();
            //empty map
            var map = new Dictionary <string, string>();

            try
            {
                binder.Bind(map, handler);
            }
            catch (MapKeyNotFoundMapBinderException ex)
            {
                Assert.AreEqual("{ctx}", ex.ExpectedKey);
                throw;
            }
        }