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
76c2e186
Commit
76c2e186
authored
Aug 20, 2017
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More test fixes
parent
4637c100
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
116 deletions
+97
-116
DataReaderTests.cs
Dapper.Tests/DataReaderTests.cs
+28
-43
NullTests.cs
Dapper.Tests/NullTests.cs
+1
-1
TypeHandlerTests.cs
Dapper.Tests/TypeHandlerTests.cs
+68
-72
No files found.
Dapper.Tests/DataReaderTests.cs
View file @
76c2e186
...
@@ -4,10 +4,7 @@
...
@@ -4,10 +4,7 @@
namespace
Dapper.Tests
namespace
Dapper.Tests
{
{
public
partial
class
DataReaderTests
:
TestBase
public
class
DataReaderTests
:
TestBase
{
[
Collection
(
"QueryCacheTests"
)]
public
class
DataReaderQueryCacheTests
:
TestBase
{
{
[
Fact
]
[
Fact
]
public
void
GetSameReaderForSameShape
()
public
void
GetSameReaderForSameShape
()
...
@@ -40,7 +37,6 @@ public void GetSameReaderForSameShape()
...
@@ -40,7 +37,6 @@ public void GetSameReaderForSameShape()
ReferenceEquals
(
origParser
,
secondParser
).
IsEqualTo
(
true
);
ReferenceEquals
(
origParser
,
secondParser
).
IsEqualTo
(
true
);
ReferenceEquals
(
secondParser
,
thirdParser
).
IsEqualTo
(
false
);
ReferenceEquals
(
secondParser
,
thirdParser
).
IsEqualTo
(
false
);
}
}
}
[
Fact
]
[
Fact
]
public
void
DiscriminatedUnion
()
public
void
DiscriminatedUnion
()
...
@@ -141,18 +137,13 @@ private abstract class Discriminated_BaseType
...
@@ -141,18 +137,13 @@ private abstract class Discriminated_BaseType
private
class
Discriminated_Foo
:
Discriminated_BaseType
private
class
Discriminated_Foo
:
Discriminated_BaseType
{
{
public
string
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
override
int
Type
{
public
override
int
Type
=>
1
;
get
{
return
1
;
}
}
}
}
private
class
Discriminated_Bar
:
Discriminated_BaseType
private
class
Discriminated_Bar
:
Discriminated_BaseType
{
{
public
float
Value
{
get
;
set
;
}
public
float
Value
{
get
;
set
;
}
public
override
int
Type
public
override
int
Type
=>
2
;
{
get
{
return
2
;
}
}
}
}
private
abstract
class
DiscriminatedWithMultiMapping_BaseType
:
Discriminated_BaseType
private
abstract
class
DiscriminatedWithMultiMapping_BaseType
:
Discriminated_BaseType
...
@@ -164,20 +155,14 @@ private class DiscriminatedWithMultiMapping_Foo : DiscriminatedWithMultiMapping_
...
@@ -164,20 +155,14 @@ private class DiscriminatedWithMultiMapping_Foo : DiscriminatedWithMultiMapping_
{
{
public
override
HazNameId
HazNameIdObject
{
get
;
set
;
}
public
override
HazNameId
HazNameIdObject
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
override
int
Type
public
override
int
Type
=>
1
;
{
get
{
return
1
;
}
}
}
}
private
class
DiscriminatedWithMultiMapping_Bar
:
DiscriminatedWithMultiMapping_BaseType
private
class
DiscriminatedWithMultiMapping_Bar
:
DiscriminatedWithMultiMapping_BaseType
{
{
public
override
HazNameId
HazNameIdObject
{
get
;
set
;
}
public
override
HazNameId
HazNameIdObject
{
get
;
set
;
}
public
float
Value
{
get
;
set
;
}
public
float
Value
{
get
;
set
;
}
public
override
int
Type
public
override
int
Type
=>
2
;
{
get
{
return
2
;
}
}
}
}
}
}
}
}
\ No newline at end of file
Dapper.Tests/NullTests.cs
View file @
76c2e186
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
using
System.Linq
;
using
System.Linq
;
namespace
Dapper.Tests
namespace
Dapper.Tests
{
{
[
Collection
(
"QueryCacheTests"
)]
[
Collection
(
NonParallelDefinition
.
Name
)]
public
class
NullTests
:
TestBase
public
class
NullTests
:
TestBase
{
{
[
Fact
]
[
Fact
]
...
...
Dapper.Tests/TypeHandlerTests.cs
View file @
76c2e186
...
@@ -8,11 +8,8 @@
...
@@ -8,11 +8,8 @@
namespace
Dapper.Tests
namespace
Dapper.Tests
{
{
[
Collection
(
"TypeHandlerTests"
)]
[
Collection
(
NonParallelDefinition
.
Name
)]
public
class
TypeHandlerTests
:
TestBase
public
class
TypeHandlerTests
:
TestBase
{
[
Collection
(
"QueryCacheTests"
)]
public
class
TypeHandlerQueryCacheTests
:
TestBase
{
{
[
Fact
]
[
Fact
]
public
void
TestChangingDefaultStringTypeMappingToAnsiString
()
public
void
TestChangingDefaultStringTypeMappingToAnsiString
()
...
@@ -96,7 +93,6 @@ public class TypeWithMapping
...
@@ -96,7 +93,6 @@ public class TypeWithMapping
[
Description
(
"A"
)]
[
Description
(
"A"
)]
public
string
B
{
get
;
set
;
}
public
string
B
{
get
;
set
;
}
}
}
}
[
Fact
]
[
Fact
]
public
void
Issue136_ValueTypeHandlers
()
public
void
Issue136_ValueTypeHandlers
()
...
@@ -512,7 +508,7 @@ public void Test_RemoveTypeMap()
...
@@ -512,7 +508,7 @@ public void Test_RemoveTypeMap()
try
try
{
{
connection
.
Execute
(
@
"INSERT INTO #Test_RemoveTypeMap VALUES (@Now)"
,
new
{
DateTime
.
Now
});
connection
.
Execute
(
"INSERT INTO #Test_RemoveTypeMap VALUES (@Now)"
,
new
{
DateTime
.
Now
});
connection
.
Query
<
DateTime
>(
"SELECT * FROM #Test_RemoveTypeMap"
);
connection
.
Query
<
DateTime
>(
"SELECT * FROM #Test_RemoveTypeMap"
);
dateTimeHandler
.
ParseWasCalled
.
IsTrue
();
dateTimeHandler
.
ParseWasCalled
.
IsTrue
();
...
@@ -639,7 +635,7 @@ public void Issue149_TypeMismatch_SequentialAccess()
...
@@ -639,7 +635,7 @@ public void Issue149_TypeMismatch_SequentialAccess()
Guid
guid
=
Guid
.
Parse
(
"cf0ef7ac-b6fe-4e24-aeda-a2b45bb5654e"
);
Guid
guid
=
Guid
.
Parse
(
"cf0ef7ac-b6fe-4e24-aeda-a2b45bb5654e"
);
try
try
{
{
var
result
=
connection
.
Query
<
Issue149_Person
>(
@
"select @guid as Id"
,
new
{
guid
}).
First
();
var
result
=
connection
.
Query
<
Issue149_Person
>(
"select @guid as Id"
,
new
{
guid
}).
First
();
error
=
null
;
error
=
null
;
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
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