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
b9d86eff
Commit
b9d86eff
authored
May 01, 2020
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contrib: make tests work
Contrib tests were broken back in
23ad634a
evidently, just now noticing...
parent
72f9988a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
4 deletions
+48
-4
Dapper.Tests.Contrib.csproj
Dapper.Tests.Contrib/Dapper.Tests.Contrib.csproj
+1
-2
Attributes.cs
Dapper.Tests.Contrib/Helpers/Attributes.cs
+46
-0
TestSuite.cs
Dapper.Tests.Contrib/TestSuite.cs
+0
-1
Dapper.Tests.csproj
Dapper.Tests/Dapper.Tests.csproj
+1
-1
No files found.
Dapper.Tests.Contrib/Dapper.Tests.Contrib.csproj
View file @
b9d86eff
...
...
@@ -7,7 +7,7 @@
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Dapper.Tests\Helpers\XunitSkippable.cs
;..\Dapper\TypeExtensions
.cs" />
<Compile Include="..\Dapper.Tests\Helpers\XunitSkippable.cs
" Link="Helpers\XunitSkippable
.cs" />
<None Remove="Test.DB.sdf" />
</ItemGroup>
<ItemGroup>
...
...
@@ -25,5 +25,4 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<!-- note: define SQLCE if SQL CE is available -->
</Project>
Dapper.Tests.Contrib/Helpers/Attributes.cs
0 → 100644
View file @
b9d86eff
using
System
;
using
Xunit.Sdk
;
namespace
Dapper.Tests
{
/// <summary>
/// <para>Override for <see cref="Xunit.FactAttribute"/> that truncates our DisplayName down.</para>
/// <para>
/// Attribute that is applied to a method to indicate that it is a fact that should
/// be run by the test runner. It can also be extended to support a customized definition
/// of a test method.
/// </para>
/// </summary>
[
AttributeUsage
(
AttributeTargets
.
Method
,
AllowMultiple
=
false
)]
[
XunitTestCaseDiscoverer
(
"Dapper.Tests.FactDiscoverer"
,
"Dapper.Tests.Contrib"
)]
public
class
FactAttribute
:
Xunit
.
FactAttribute
{
}
/// <summary>
/// <para>Override for <see cref="Xunit.TheoryAttribute"/> that truncates our DisplayName down.</para>
/// <para>
/// Marks a test method as being a data theory. Data theories are tests which are
/// fed various bits of data from a data source, mapping to parameters on the test
/// method. If the data source contains multiple rows, then the test method is executed
/// multiple times (once with each data row). Data is provided by attributes which
/// derive from Xunit.Sdk.DataAttribute (notably, Xunit.InlineDataAttribute and Xunit.MemberDataAttribute).
/// </para>
/// </summary>
[
AttributeUsage
(
AttributeTargets
.
Method
,
AllowMultiple
=
false
)]
[
XunitTestCaseDiscoverer
(
"Dapper.Tests.TheoryDiscoverer"
,
"Dapper.Tests.Contrib"
)]
public
class
TheoryAttribute
:
Xunit
.
TheoryAttribute
{
}
[
AttributeUsage
(
AttributeTargets
.
Method
,
AllowMultiple
=
false
)]
public
sealed
class
FactLongRunningAttribute
:
FactAttribute
{
public
FactLongRunningAttribute
()
{
#if !LONG_RUNNING
Skip
=
"Long running"
;
#endif
}
public
string
Url
{
get
;
private
set
;
}
}
}
Dapper.Tests.Contrib/TestSuite.cs
View file @
b9d86eff
...
...
@@ -2,7 +2,6 @@
using
System.Collections.Generic
;
using
System.Data
;
using
System.Linq
;
using
System.Transactions
;
using
Dapper.Contrib.Extensions
;
using
Xunit
;
...
...
Dapper.Tests/Dapper.Tests.csproj
View file @
b9d86eff
...
...
@@ -13,10 +13,10 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Dapper.SqlBuilder\Dapper.SqlBuilder.csproj" />
<ProjectReference Include="..\Dapper\Dapper.csproj" />
<ProjectReference Include="..\Dapper.Contrib\Dapper.Contrib.csproj" />
<ProjectReference Include="..\Dapper.ProviderTools\Dapper.ProviderTools.csproj" />
<ProjectReference Include="..\Dapper.SqlBuilder\Dapper.SqlBuilder.csproj" />
<PackageReference Include="FirebirdSql.Data.FirebirdClient" Version="7.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.6" />
...
...
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