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
12b6b9aa
Commit
12b6b9aa
authored
Aug 27, 2019
by
mgravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use SkipTestException
parent
ed78dd6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
ParameterTests.cs
Dapper.Tests/ParameterTests.cs
+3
-3
EntityFrameworkTests.cs
Dapper.Tests/Providers/EntityFrameworkTests.cs
+2
-2
TestBase.cs
Dapper.Tests/TestBase.cs
+5
-1
No files found.
Dapper.Tests/ParameterTests.cs
View file @
12b6b9aa
...
@@ -718,7 +718,7 @@ private class HazSqlGeo
...
@@ -718,7 +718,7 @@ private class HazSqlGeo
[
Fact
]
[
Fact
]
public
void
DBGeography_SO24405645_SO24402424
()
public
void
DBGeography_SO24405645_SO24402424
()
{
{
if
(
IsMsDataClient
)
return
;
// not supported
SkipIfMsDataClient
();
EntityFramework
.
Handlers
.
Register
();
EntityFramework
.
Handlers
.
Register
();
...
@@ -741,7 +741,7 @@ public void DBGeography_SO24405645_SO24402424()
...
@@ -741,7 +741,7 @@ public void DBGeography_SO24405645_SO24402424()
[
Fact
]
[
Fact
]
public
void
SqlGeography_SO25538154
()
public
void
SqlGeography_SO25538154
()
{
{
if
(
IsMsDataClient
)
return
;
// not supported
SkipIfMsDataClient
();
SqlMapper
.
ResetTypeHandlers
();
SqlMapper
.
ResetTypeHandlers
();
connection
.
Execute
(
"create table #SqlGeo (id int, geo geography, geometry geometry)"
);
connection
.
Execute
(
"create table #SqlGeo (id int, geo geography, geometry geometry)"
);
...
@@ -781,7 +781,7 @@ public void NullableSqlGeometry()
...
@@ -781,7 +781,7 @@ public void NullableSqlGeometry()
[
Fact
]
[
Fact
]
public
void
SqlHierarchyId_SO18888911
()
public
void
SqlHierarchyId_SO18888911
()
{
{
if
(
IsMsDataClient
)
return
;
// not supported
SkipIfMsDataClient
();
SqlMapper
.
ResetTypeHandlers
();
SqlMapper
.
ResetTypeHandlers
();
var
row
=
connection
.
Query
<
HazSqlHierarchy
>(
"select 3 as [Id], hierarchyid::Parse('/1/2/3/') as [Path]"
).
Single
();
var
row
=
connection
.
Query
<
HazSqlHierarchy
>(
"select 3 as [Id], hierarchyid::Parse('/1/2/3/') as [Path]"
).
Single
();
...
...
Dapper.Tests/Providers/EntityFrameworkTests.cs
View file @
12b6b9aa
...
@@ -22,7 +22,7 @@ public EntityFrameworkTests()
...
@@ -22,7 +22,7 @@ public EntityFrameworkTests()
[
Fact
]
[
Fact
]
public
void
Issue570_DbGeo_HasValues
()
public
void
Issue570_DbGeo_HasValues
()
{
{
if
(
IsMsDataClient
)
return
;
// not supported
SkipIfMsDataClient
();
EntityFramework
.
Handlers
.
Register
();
EntityFramework
.
Handlers
.
Register
();
const
string
redmond
=
"POINT (-122.1215 47.6740)"
;
const
string
redmond
=
"POINT (-122.1215 47.6740)"
;
...
@@ -39,7 +39,7 @@ public void Issue570_DbGeo_HasValues()
...
@@ -39,7 +39,7 @@ public void Issue570_DbGeo_HasValues()
[
Fact
]
[
Fact
]
public
void
Issue22_ExecuteScalar_EntityFramework
()
public
void
Issue22_ExecuteScalar_EntityFramework
()
{
{
if
(
IsMsDataClient
)
return
;
// not supported
SkipIfMsDataClient
();
var
geo
=
DbGeography
.
LineFromText
(
"LINESTRING(-122.360 47.656, -122.343 47.656 )"
,
4326
);
var
geo
=
DbGeography
.
LineFromText
(
"LINESTRING(-122.360 47.656, -122.343 47.656 )"
,
4326
);
var
geo2
=
connection
.
ExecuteScalar
<
DbGeography
>(
"select @geo"
,
new
{
geo
});
var
geo2
=
connection
.
ExecuteScalar
<
DbGeography
>(
"select @geo"
,
new
{
geo
});
...
...
Dapper.Tests/TestBase.cs
View file @
12b6b9aa
...
@@ -81,7 +81,11 @@ public sealed class MicrosoftSqlClientProvider : SqlServerDatabaseProvider
...
@@ -81,7 +81,11 @@ public sealed class MicrosoftSqlClientProvider : SqlServerDatabaseProvider
public
abstract
class
TestBase
<
TProvider
>
:
IDisposable
where
TProvider
:
DatabaseProvider
public
abstract
class
TestBase
<
TProvider
>
:
IDisposable
where
TProvider
:
DatabaseProvider
{
{
protected
bool
IsMsDataClient
=>
connection
is
Microsoft
.
Data
.
SqlClient
.
SqlConnection
;
protected
void
SkipIfMsDataClient
()
{
if
(
connection
is
Microsoft
.
Data
.
SqlClient
.
SqlConnection
)
throw
new
SkipTestException
(
"Not supported on Microsoft.Data.SqlClient"
);
}
protected
DbConnection
GetOpenConnection
()
=>
Provider
.
GetOpenConnection
();
protected
DbConnection
GetOpenConnection
()
=>
Provider
.
GetOpenConnection
();
protected
DbConnection
GetClosedConnection
()
=>
Provider
.
GetClosedConnection
();
protected
DbConnection
GetClosedConnection
()
=>
Provider
.
GetClosedConnection
();
...
...
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