Ejemplo n.º 1
0
        protected static T Scenario <T>(string description, Func <StoreOptions, MartenRegistry.DocumentMappingExpression <T> > configuration = null) where T : new()
        {
            var options    = new StoreOptions();
            var expression = configuration(options);

            options.ApplyConfiguration();

            var mapping  = options.Storage.MappingFor(typeof(T)).As <DocumentMapping <T> >();
            var scenario = new CodeGenScenario <T>(description, mapping, options);

            _scenarios.Add(scenario);

            return(scenario.Document);
        }