Skip to content

Commit 5717812

Browse files
committed
Update AdoNet.Specification.Tests to 2.0.0-alpha8.
1 parent 3252b8b commit 5717812

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

tests/Conformance.Tests/Conformance.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="AdoNet.Specification.Tests" Version="2.0.0-alpha7" />
14+
<PackageReference Include="AdoNet.Specification.Tests" Version="2.0.0-alpha8" />
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.2" />
1616
<PackageReference Include="xunit" Version="2.4.1" />
1717
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />

tests/Conformance.Tests/DataReaderTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ public DataReaderTests(SelectValueFixture fixture)
1212

1313
[Fact(Skip = "Deliberately throws InvalidCastException")]
1414
public override void GetTextReader_returns_empty_for_null_String() { }
15-
16-
[Fact(Skip = "https://github.com/mysql-net/MySqlConnector/issues/877")]
17-
public override void GetSchemaTable_throws_after_Delete() { }
1815
}
1916
}

tests/Conformance.Tests/GetValueConversionTests.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,39 @@ public GetValueConversionTests(SelectValueFixture fixture)
8585
public override void GetBoolean_throws_for_zero_Decimal() => TestGetValue(DbType.Decimal, ValueKind.Zero, x => x.GetBoolean(0), false);
8686
public override void GetBoolean_throws_for_zero_Decimal_with_GetFieldValue() => TestGetValue(DbType.Decimal, ValueKind.Zero, x => x.GetBoolean(0), false);
8787

88+
// BOOL columns can be coerced to integers: https://github.com/mysql-net/MySqlConnector/issues/782
89+
public override void GetByte_throws_for_minimum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetByte(0), (byte) 0);
90+
public override void GetByte_throws_for_minimum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetFieldValue<byte>(0), (byte) 0);
91+
public override void GetByte_throws_for_zero_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetByte(0), (byte) 0);
92+
public override void GetByte_throws_for_zero_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetFieldValue<byte>(0), (byte) 0);
93+
public override void GetByte_throws_for_one_Boolean() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetByte(0), (byte) 1);
94+
public override void GetByte_throws_for_one_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetFieldValue<byte>(0), (byte) 1);
95+
public override void GetByte_throws_for_maximum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetByte(0), (byte) 1);
96+
public override void GetByte_throws_for_maximum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetFieldValue<byte>(0), (byte) 1);
97+
public override void GetInt16_throws_for_minimum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetInt16(0), (short) 0);
98+
public override void GetInt16_throws_for_minimum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetFieldValue<short>(0), (short) 0);
99+
public override void GetInt16_throws_for_zero_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetInt16(0), (short) 0);
100+
public override void GetInt16_throws_for_zero_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetFieldValue<short>(0), (short) 0);
101+
public override void GetInt16_throws_for_one_Boolean() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetInt16(0), (short) 1);
102+
public override void GetInt16_throws_for_one_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetFieldValue<short>(0), (short) 1);
103+
public override void GetInt16_throws_for_maximum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetInt16(0), (short) 1);
104+
public override void GetInt16_throws_for_maximum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetFieldValue<short>(0), (short) 1);
105+
public override void GetInt32_throws_for_minimum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetInt32(0), 0);
106+
public override void GetInt32_throws_for_minimum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetFieldValue<int>(0), 0);
107+
public override void GetInt32_throws_for_zero_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetInt32(0), 0);
108+
public override void GetInt32_throws_for_zero_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetFieldValue<int>(0), 0);
109+
public override void GetInt32_throws_for_one_Boolean() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetInt32(0), 1);
110+
public override void GetInt32_throws_for_one_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetFieldValue<int>(0), 1);
111+
public override void GetInt32_throws_for_maximum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetInt32(0), 1);
112+
public override void GetInt32_throws_for_maximum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetFieldValue<int>(0), 1);
113+
public override void GetInt64_throws_for_minimum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetInt64(0), 0L);
114+
public override void GetInt64_throws_for_minimum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Minimum, x => x.GetFieldValue<long>(0), 0L);
115+
public override void GetInt64_throws_for_zero_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetInt64(0), 0L);
116+
public override void GetInt64_throws_for_zero_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Zero, x => x.GetFieldValue<long>(0), 0L);
117+
public override void GetInt64_throws_for_one_Boolean() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetInt64(0), 1L);
118+
public override void GetInt64_throws_for_one_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.One, x => x.GetFieldValue<long>(0), 1L);
119+
public override void GetInt64_throws_for_maximum_Boolean() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetInt64(0), 1L);
120+
public override void GetInt64_throws_for_maximum_Boolean_with_GetFieldValue() => TestGetValue(DbType.Boolean, ValueKind.Maximum, x => x.GetFieldValue<long>(0), 1L);
88121

89122
// GetByte allows integral conversions
90123
public override void GetByte_throws_for_maximum_Int16() => TestException(DbType.Int16, ValueKind.Maximum, x => x.GetByte(0), typeof(OverflowException));

0 commit comments

Comments
 (0)