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
1ea4eb82
Commit
1ea4eb82
authored
Apr 01, 2011
by
Sam Saffron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another test
parent
5d9e188b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
SqlMapper.csproj
SqlMapper.csproj
+0
-14
Tests.cs
Tests.cs
+27
-0
No files found.
SqlMapper.csproj
View file @
1ea4eb82
...
@@ -81,12 +81,6 @@
...
@@ -81,12 +81,6 @@
<LastGenOutput>
DataClasses.designer.cs
</LastGenOutput>
<LastGenOutput>
DataClasses.designer.cs
</LastGenOutput>
<SubType>
Designer
</SubType>
<SubType>
Designer
</SubType>
</None>
</None>
<None
Include=
"nhibernate\nhibernate-configuration.xsd"
>
<SubType>
Designer
</SubType>
</None>
<None
Include=
"nhibernate\nhibernate-mapping.xsd"
>
<SubType>
Designer
</SubType>
</None>
<None
Include=
"Properties\Settings.settings"
>
<None
Include=
"Properties\Settings.settings"
>
<Generator>
SettingsSingleFileGenerator
</Generator>
<Generator>
SettingsSingleFileGenerator
</Generator>
<LastGenOutput>
Settings.Designer.cs
</LastGenOutput>
<LastGenOutput>
Settings.Designer.cs
</LastGenOutput>
...
@@ -100,14 +94,6 @@
...
@@ -100,14 +94,6 @@
<DependentUpon>
DataClasses.dbml
</DependentUpon>
<DependentUpon>
DataClasses.dbml
</DependentUpon>
</None>
</None>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Content
Include=
"nhibernate\Iesi.Collections.dll"
/>
<Content
Include=
"nhibernate\Iesi.Collections.pdb"
/>
<Content
Include=
"nhibernate\Iesi.Collections.xml"
/>
<Content
Include=
"nhibernate\NHibernate.dll"
/>
<Content
Include=
"nhibernate\NHibernate.pdb"
/>
<Content
Include=
"nhibernate\NHibernate.xml"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Other similar extension points exist, see Microsoft.Common.targets.
...
...
Tests.cs
View file @
1ea4eb82
...
@@ -16,6 +16,14 @@ void AssertEquals(object a, object b)
...
@@ -16,6 +16,14 @@ void AssertEquals(object a, object b)
}
}
}
}
void
AssertNull
(
object
a
)
{
if
(
a
!=
null
)
{
throw
new
ApplicationException
(
string
.
Format
(
"{0} should be null"
,
a
));
}
}
SqlConnection
connection
=
Program
.
GetOpenConnection
();
SqlConnection
connection
=
Program
.
GetOpenConnection
();
...
@@ -36,5 +44,24 @@ public void PassInIntArray()
...
@@ -36,5 +44,24 @@ public void PassInIntArray()
AssertEquals
(
items
[
1
],
2
);
AssertEquals
(
items
[
1
],
2
);
AssertEquals
(
items
[
2
],
3
);
AssertEquals
(
items
[
2
],
3
);
}
}
public
class
Dog
{
public
int
?
Age
{
get
;
set
;
}
public
Guid
Id
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
float
?
Weight
{
get
;
set
;
}
public
int
IgnoredProperty
{
get
{
return
1
;
}
}
}
public
void
TestIntSupportsNull
()
{
var
dog
=
connection
.
ExecuteMapperQuery
<
Dog
>(
"select Age = @Age"
,
new
{
Age
=
(
int
?)
null
});
AssertEquals
(
dog
.
Count
(),
1
);
AssertNull
(
dog
.
First
().
Age
);
}
}
}
}
}
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