public void FluentConfigShouldBePlacedOnDatabaseWhenInsertedIntoFactoryConfig() { var db = new Database(new SqlConnection()); var pocoDataFactory = new PocoDataFactory(y => new PocoData(y, new Mapper())); var fluentConfig = new FluentConfig(x=>pocoDataFactory); var factory = DatabaseFactory.Config(x => { x.UsingDatabase(() => db); x.WithFluentConfig(fluentConfig); }); var database = factory.GetDatabase(); Assert.AreEqual(fluentConfig.Config(null), database.PocoDataFactory); }
public DatabaseFactoryConfig WithFluentConfig(FluentConfig fluentConfig) { _options.PocoDataFactory = fluentConfig; return this; }