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
e14839f7
Commit
e14839f7
authored
Oct 21, 2012
by
mrange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated IsEqualTo and IsSequenceEqualTo so that they don't throw if first parameter is null.
parent
d7ba878d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Assert.cs
Tests/Assert.cs
+2
-2
Tests.cs
Tests/Tests.cs
+1
-1
No files found.
Tests/Assert.cs
View file @
e14839f7
...
...
@@ -10,7 +10,7 @@ static class Assert
public
static
void
IsEqualTo
<
T
>(
this
T
obj
,
T
other
)
{
if
(!
obj
.
Equals
(
other
))
if
(!
Equals
(
obj
,
other
))
{
throw
new
ApplicationException
(
string
.
Format
(
"{0} should be equals to {1}"
,
obj
,
other
));
}
...
...
@@ -18,7 +18,7 @@ public static void IsEqualTo<T>(this T obj, T other)
public
static
void
IsSequenceEqualTo
<
T
>(
this
IEnumerable
<
T
>
obj
,
IEnumerable
<
T
>
other
)
{
if
(!
obj
.
SequenceEqual
(
other
))
if
(!
(
obj
??
new
T
[
0
]).
SequenceEqual
(
other
??
new
T
[
0
]
))
{
throw
new
ApplicationException
(
string
.
Format
(
"{0} should be equals to {1}"
,
obj
,
other
));
}
...
...
Tests/Tests.cs
View file @
e14839f7
...
...
@@ -2121,7 +2121,7 @@ public void TestMultiSelectWithSomeEmptyGrids()
four
[
0
].
IsEqualTo
(
4
);
}
}
[
ActiveTest
]
public
void
TestDynamicMutation
()
{
var
obj
=
connection
.
Query
(
"select 1 as [a], 2 as [b], 3 as [c]"
).
Single
();
...
...
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