Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Dapper
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
Dapper
Commits
92eca472
Commit
92eca472
authored
Apr 01, 2016
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify test credentials for MySQL; add passing test for SO36303462
parent
2b4bb22d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
TestSuites.cs
Dapper.Tests.Contrib/TestSuites.cs
+3
-3
Tests.cs
Dapper.Tests/Tests.cs
+24
-0
No files found.
Dapper.Tests.Contrib/TestSuites.cs
View file @
92eca472
...
@@ -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
()
{
{
...
...
Dapper.Tests/Tests.cs
View file @
92eca472
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment