Skip to content

Commit f56a2bc

Browse files
DanielW093grdsdev
authored andcommitted
Added tests
1 parent c3c8b60 commit f56a2bc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

PostgrestTests/ClientTests.cs

+18
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,24 @@ public async Task TestCountWithFilter()
10411041
Assert.IsNotNull(resp);
10421042
}
10431043

1044+
[TestMethod("response count")]
1045+
public async Task TestCountInResponse()
1046+
{
1047+
var client = new Client(BaseUrl);
1048+
1049+
var resp = await client.Table<User>().Get(default, CountType.Exact);
1050+
Assert.IsTrue(resp.Count > -1);
1051+
}
1052+
1053+
[TestMethod("response count: with filter")]
1054+
public async Task TestCountInResponseWithFilter()
1055+
{
1056+
var client = new Client(BaseUrl);
1057+
1058+
var resp = await client.Table<User>().Filter("status", Operator.Equals, "ONLINE").Get(default, CountType.Exact);
1059+
Assert.IsTrue(resp.Count > -1);
1060+
}
1061+
10441062
[TestMethod("support: int arrays")]
10451063
public async Task TestSupportIntArraysAsLists()
10461064
{

0 commit comments

Comments
 (0)