Exemplo n.º 1
0
        public void Setup()
        {
            this._emptyParameters = new List <ISearchParameter>();

            this._documentResult = new DocumentResult <TestDocument>();

            // Data using http://www.json-generator.com/
            var assembly = typeof(DocumentResultBenchmarks).GetTypeInfo().Assembly;
            var str      = EmbeddedResourceHelper.GetByName(assembly, $"SolrExpress.Benchmarks.Solr4.Search.Result.DocumentResultBenchmarks{this.ElementsCount}.json");

            this._jsonObject = JObject.Parse(str);
        }
        public void Setup()
        {
            var expressionCache   = new ExpressionCache <TestDocument>();
            var expressionBuilder = (IExpressionBuilder <TestDocument>) new ExpressionBuilder <TestDocument>(expressionCache);

            this._parameters = new List <ISearchParameter> {
                new FacetRangeParameter <TestDocument>(expressionBuilder).Configure("facetRange", q => q.Age, "10", "10", "100")
            };

            this._facetRangeResult = new FacetRangeResult <TestDocument>(expressionBuilder);

            // Data using http://www.json-generator.com/
            var assembly = typeof(FacetRangeResultBenchmarks).GetTypeInfo().Assembly;
            var str      = EmbeddedResourceHelper.GetByName(assembly, $"SolrExpress.Benchmarks.Solr4.Search.Result.FacetRangeResultBenchmarks{this.ElementsCount}.json");

            this._jsonObject = JObject.Parse(str);
        }