public void Should_Get_Mappings_Specific_To_The_Type_Requested()
        {
            //Arrange
            Func <Type, IMappingConfiguration> mappingsDelegate = x =>
            {
                if (x == typeof(Foo))
                {
                    return(fooMapping);
                }
                return(null);
            };
            var target = new RepositoryFactory(Settings.Default.Connection, mappingsDelegate);

            //Act
            var repository = target.Create <Foo>();

            try
            {
                repository.Context.AsQueryable <Foo>().ToList();
            }
            catch (Exception)
            {
                //Suppress the error from the context. This allows us to test the mappings peice without having to actually map.
            }
            //Assert
            fooMapping.VerifyAllExpectations();
        }
        public void Mappings_Can_Be_Injected_instead_of_explicitly_coded_in_the_context()
        {
            //Arrange
            _mockMapping.Expect(x => x.ConfigureModelBuilder(Arg <DbModelBuilder> .Is.Anything));

            //Act
            try
            {
                target.Set <Foo>().ToList();
            }
            catch (Exception)
            {
                //Suppress the error from the context. This allows us to test the mappings peice without having to actually map.
            }


            //Assert
            _mockMapping.VerifyAllExpectations();
        }