.NET NEST Api RhinoMock Aggregation

Hello,

I have the following aggregation. How can I mock the data for this on RhinoMock?
new SearchRequest()
{
Size = 0,
Query = new TermQuery
{
Field = Infer.Field(f => f.ClientId),
Value = ClientId
} && new TermQuery
{
Field = Infer.Field(f => f.TestGroupId),
Value = TestGroupId
} && new TermQuery
{
Field = Infer.Field(f => f.IsReleaseValidation),
Value = false
},
Aggregations = new TermsAggregation("jobs")
{
Field = Infer.Field(f => f.RunSourceName.Suffix("keyword")),
Size = 100,
Aggregations = new TermsAggregation("runs")
{
Field = Infer.Field(f => f.RunId),
Size = 100,
Aggregations = new TopHitsAggregation("groupby_runs")
{
Size = 100,
Sort = new List
{
new SortField { Field = Infer.Field(f => f.TimeStamp), Order = SortOrder.Descending }
},
Source = new SourceFilter
{
Includes = new[] { Infer.Field(f => f.RunId),
Infer.Field(f => f.TimeStamp),
Infer.Field(f => f.RunSourceName),
Infer.Field(f => f.IsPassed),
Infer.Field(f => f.RunSourceDuration),
Infer.Field(f => f.IsReleaseValidation)}
}
}
}
}
};

Please use the </> button to highlight and format your code; it makes it much easier to read :thumbsup:

When you say mock the data, do you mean stub data returned from the executing this request?

What have you tried so far?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.