Skip to content

Commit fe11b94

Browse files
authored
Add assertions to ScriptFieldsUsageTests (#5219)
1 parent fcb090f commit fe11b94

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Tests/Search/Request/ScriptFieldsUsageTests.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See the LICENSE file in the project root for more information
44

55
using System;
6+
using FluentAssertions;
67
using Nest;
78
using Tests.Core.ManagedElasticsearch.Clusters;
89
using Tests.Domain;
@@ -85,5 +86,15 @@ public ScriptFieldsUsageTests(ReadOnlyCluster cluster, EndpointUsage usage) : ba
8586
}
8687
}
8788
};
89+
90+
91+
protected override void ExpectResponse(ISearchResponse<Project> response)
92+
{
93+
foreach (var fields in response.Fields)
94+
{
95+
fields.Value<int>("test1").Should().BeGreaterOrEqualTo(0);
96+
fields.Value<double>("test2").Should().BeGreaterOrEqualTo(0);
97+
}
98+
}
8899
}
89100
}

0 commit comments

Comments
 (0)