Commit 92eca472 authored by Marc Gravell's avatar Marc Gravell

Unify test credentials for MySQL; add passing test for SO36303462

parent 2b4bb22d
...@@ -66,10 +66,10 @@ public class MySqlServerTestSuite : TestSuite ...@@ -66,10 +66,10 @@ public class MySqlServerTestSuite : TestSuite
{ {
const string DbName = "DapperContribTests"; const string DbName = "DapperContribTests";
public static string ConnectionString => public static string ConnectionString { get; private set; } =
IsAppVeyor IsAppVeyor
? @"Server=localhost;Uid=root;Pwd=Password12!;" ? "Server=localhost;Uid=root;Pwd=Password12!;"
: $"Server=localhost;Uid=root;Pwd=Password12!;"; : "Server=localhost;Uid=test;Pwd=pass;";
public override IDbConnection GetConnection() public override IDbConnection GetConnection()
{ {
......
...@@ -3167,6 +3167,30 @@ public void Issue426_SO34439033_DateTimeGainsTicks() ...@@ -3167,6 +3167,30 @@ public void Issue426_SO34439033_DateTimeGainsTicks()
} }
} }
[FactMySql]
public void SO36303462_Tinyint_Bools()
{
using (var conn = GetMySqlConnection(true, true, true))
{
try { conn.Execute("drop table SO36303462_Test"); } catch { }
conn.Execute("create table SO36303462_Test (Id int not null, IsBold tinyint not null);");
conn.Execute("insert SO36303462_Test (Id, IsBold) values (1,1);");
conn.Execute("insert SO36303462_Test (Id, IsBold) values (2,0);");
conn.Execute("insert SO36303462_Test (Id, IsBold) values (3,1);");
var rows = conn.Query<SO36303462>("select * from SO36303462_Test").ToDictionary(x => x.Id);
rows.Count.IsEqualTo(3);
rows[1].IsBold.IsTrue();
rows[2].IsBold.IsFalse();
rows[3].IsBold.IsTrue();
}
}
class SO36303462
{
public int Id { get; set; }
public bool IsBold { get; set; }
}
public class Issue426_Test public class Issue426_Test
{ {
public long Id { get; set; } public long Id { get; set; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment