Skip to content

Commit 0a526b7

Browse files
Add assertions to ScriptFieldsUsageTests (#5219) (#5223)
Co-authored-by: Russ Cam <russ.cam@elastic.co>
1 parent e3bd01d commit 0a526b7

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;
@@ -83,5 +84,15 @@ public ScriptFieldsUsageTests(ReadOnlyCluster cluster, EndpointUsage usage) : ba
8384
}
8485
}
8586
};
87+
88+
89+
protected override void ExpectResponse(ISearchResponse<Project> response)
90+
{
91+
foreach (var fields in response.Fields)
92+
{
93+
fields.Value<int>("test1").Should().BeGreaterOrEqualTo(0);
94+
fields.Value<double>("test2").Should().BeGreaterOrEqualTo(0);
95+
}
96+
}
8697
}
8798
}

0 commit comments

Comments
 (0)