Add tests for alpha BT values
- Update deps - Update release notes for v3.1
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Expecto" Version="10.1.0" />
|
||||
<PackageReference Include="Expecto" Version="10.2.1" />
|
||||
<PackageReference Include="ThrowawayDb.Postgres" Version="1.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ public static class PostgresCSharpTests
|
||||
var theCount = await Count.All(PostgresDb.TableName);
|
||||
Expect.equal(theCount, 5, "There should have been 5 matching documents");
|
||||
}),
|
||||
TestCase("ByField succeeds", async () =>
|
||||
TestCase("ByField succeeds for numeric range", async () =>
|
||||
{
|
||||
await using var db = PostgresDb.BuildDb();
|
||||
await LoadDocs();
|
||||
@@ -557,6 +557,14 @@ public static class PostgresCSharpTests
|
||||
var theCount = await Count.ByField(PostgresDb.TableName, Field.BT("NumValue", 10, 20));
|
||||
Expect.equal(theCount, 3, "There should have been 3 matching documents");
|
||||
}),
|
||||
TestCase("ByField succeeds for non-numeric range", async () =>
|
||||
{
|
||||
await using var db = PostgresDb.BuildDb();
|
||||
await LoadDocs();
|
||||
|
||||
var theCount = await Count.ByField(PostgresDb.TableName, Field.BT("Value", "aardvark", "apple"));
|
||||
Expect.equal(theCount, 1, "There should have been 1 matching document");
|
||||
}),
|
||||
TestCase("ByContains succeeds", async () =>
|
||||
{
|
||||
await using var db = PostgresDb.BuildDb();
|
||||
|
||||
@@ -399,13 +399,21 @@ public static class SqliteCSharpTests
|
||||
var theCount = await Count.All(SqliteDb.TableName);
|
||||
Expect.equal(theCount, 5L, "There should have been 5 matching documents");
|
||||
}),
|
||||
TestCase("ByField succeeds", async () =>
|
||||
TestCase("ByField succeeds for numeric range", async () =>
|
||||
{
|
||||
await using var db = await SqliteDb.BuildDb();
|
||||
await LoadDocs();
|
||||
|
||||
var theCount = await Count.ByField(SqliteDb.TableName, Field.BT("NumValue", 10, 20));
|
||||
Expect.equal(theCount, 3L, "There should have been 3 matching documents");
|
||||
}),
|
||||
TestCase("ByField succeeds for non-numeric range", async () =>
|
||||
{
|
||||
await using var db = await SqliteDb.BuildDb();
|
||||
await LoadDocs();
|
||||
|
||||
var theCount = await Count.ByField(SqliteDb.TableName, Field.BT("Value", "aardvark", "apple"));
|
||||
Expect.equal(theCount, 1L, "There should have been 1 matching document");
|
||||
})
|
||||
}),
|
||||
TestList("Exists", new[]
|
||||
|
||||
Reference in New Issue
Block a user