Skip to content

Commit

Permalink
More nullable list tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Jun 19, 2024
1 parent 18decab commit 9c0dbf8
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions DuckDB.NET.Test/DuckDBManagedAppenderListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,25 @@ public void ListValuesSByte()
ListValuesInternal("TinyInt", faker => faker.Random.SByte());
}

[Fact]
public void ListValuesSByteNullable()
{
ListValuesInternal("TinyInt", faker => faker.Random.SByte().OrNull(faker));
}

[Fact]
public void ListValuesShort()
{
ListValuesInternal("SmallInt", faker => faker.Random.Short());
}

[Fact]
public void ListValuesShortNullable()
{
ListValuesInternal("SmallInt", faker => faker.Random.Short().OrNull(faker));
}


[Fact]
public void ListValuesInt()
{
Expand All @@ -52,6 +65,12 @@ public void ListValuesLong()
ListValuesInternal("BigInt", faker => faker.Random.Long());
}

[Fact]
public void ListValuesLongNullable()
{
ListValuesInternal("BigInt", faker => faker.Random.Long().OrNull(faker));
}

[Fact]
public void ListValuesHugeInt()
{
Expand All @@ -64,24 +83,48 @@ public void ListValuesByte()
ListValuesInternal("UTinyInt", faker => faker.Random.Byte());
}

[Fact]
public void ListValuesByteNullable()
{
ListValuesInternal("UTinyInt", faker => faker.Random.Byte().OrNull(faker));
}

[Fact]
public void ListValuesUShort()
{
ListValuesInternal("USmallInt", faker => faker.Random.UShort());
}

[Fact]
public void ListValuesUShortNullable()
{
ListValuesInternal("USmallInt", faker => faker.Random.UShort().OrNull(faker));
}

[Fact]
public void ListValuesUInt()
{
ListValuesInternal("UInteger", faker => faker.Random.UInt());
}

[Fact]
public void ListValuesUIntNullable()
{
ListValuesInternal("UInteger", faker => faker.Random.UInt().OrNull(faker));
}

[Fact]
public void ListValuesULong()
{
ListValuesInternal("UBigInt", faker => faker.Random.ULong());
}

[Fact]
public void ListValuesULongNullable()
{
ListValuesInternal("UBigInt", faker => faker.Random.ULong().OrNull(faker));
}

[Fact]
public void ListValuesUHugeInt()
{
Expand All @@ -94,12 +137,24 @@ public void ListValuesDecimal()
ListValuesInternal("Decimal(38,28)", faker => faker.Random.Decimal());
}

[Fact]
public void ListValuesDecimalNullable()
{
ListValuesInternal("Decimal(38,28)", faker => faker.Random.Decimal().OrNull(faker));
}

[Fact]
public void ListValuesFloat()
{
ListValuesInternal("Float", faker => faker.Random.Float());
}

[Fact]
public void ListValuesFloatNullable()
{
ListValuesInternal("Float", faker => faker.Random.Float().OrNull(faker));
}

[Fact]
public void ListValuesDouble()
{
Expand All @@ -118,6 +173,12 @@ public void ListValuesGuid()
ListValuesInternal("UUID", faker => faker.Random.Guid());
}

[Fact]
public void ListValuesGuidNullable()
{
ListValuesInternal("UUID", faker => faker.Random.Guid().OrNull(faker));
}

[Fact]
public void ListValuesDate()
{
Expand Down

0 comments on commit 9c0dbf8

Please sign in to comment.