Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Commit 626e2eb

Browse files
authored
Merge pull request #29 from MicroLite-ORM/develop
7.0.0
2 parents e4b30d7 + c9afff5 commit 626e2eb

18 files changed

+120
-123
lines changed

.editorconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ dotnet_style_prefer_conditional_expression_over_return = true:refactoring
107107
csharp_prefer_simple_default_expression = true:suggestion
108108

109109
# Expression-bodied members
110-
csharp_style_expression_bodied_methods = true:refactoring
111-
csharp_style_expression_bodied_constructors = true:refactoring
112-
csharp_style_expression_bodied_operators = true:refactoring
113-
csharp_style_expression_bodied_properties = true:refactoring
114-
csharp_style_expression_bodied_indexers = true:refactoring
115-
csharp_style_expression_bodied_accessors = true:refactoring
110+
csharp_style_expression_bodied_methods = true:suggestion
111+
csharp_style_expression_bodied_constructors = true:suggestion
112+
csharp_style_expression_bodied_operators = true:suggestion
113+
csharp_style_expression_bodied_properties = true:suggestion
114+
csharp_style_expression_bodied_indexers = true:suggestion
115+
csharp_style_expression_bodied_accessors = true:suggestion
116116
csharp_style_expression_bodied_lambdas = true:refactoring
117117
csharp_style_expression_bodied_local_functions = true:refactoring
118118

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ bld/
3131
[Ll]og/
3232
[Ll]ogs/
3333

34+
# Visual Studio Code cache/options directory
35+
.vscode/
36+
3437
# Visual Studio 2015/2017 cache/options directory
3538
.vs/
3639
# Uncomment if you have tasks that create the project's static files in wwwroot

CustomDictionary.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

MicroLite.Extensions.Mvc.Tests/AutoManageTransactionAttributeTests.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class AutoManageTransactionAttributeTests
1313
{
1414
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndAnActiveTransaction
1515
{
16-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
16+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
1717
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
1818

1919
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndAnActiveTransaction()
@@ -53,7 +53,7 @@ public void TheTransactionIsNotRolledBack()
5353

5454
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndAutoManageTransactionIsFalse
5555
{
56-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
56+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
5757
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
5858

5959
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndAutoManageTransactionIsFalse()
@@ -96,7 +96,7 @@ public void TheTransactionIsNotRolledBack()
9696

9797
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndCommittingAnActiveTransactionThrowsAnException
9898
{
99-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
99+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
100100
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
101101

102102
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndCommittingAnActiveTransactionThrowsAnException()
@@ -138,7 +138,7 @@ public void TheTransactionIsNotRolledBack()
138138

139139
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndNoActiveTransaction
140140
{
141-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
141+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
142142
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
143143

144144
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndNoActiveTransaction()
@@ -178,7 +178,7 @@ public void TheTransactionIsNotRolledBack()
178178

179179
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndNoCurrentTransaction
180180
{
181-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
181+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
182182

183183
[Fact]
184184
public void OnActionExecutedDoesNotThrowAnException()
@@ -198,7 +198,7 @@ public void OnActionExecutedDoesNotThrowAnException()
198198

199199
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack
200200
{
201-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
201+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
202202
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
203203

204204
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack()
@@ -239,7 +239,7 @@ public void TheTransactionIsNotRolledBackAgain()
239239

240240
public class WhenCallingOnActionExecuted_WithAMicroLiteController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack
241241
{
242-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
242+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
243243
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
244244

245245
public WhenCallingOnActionExecuted_WithAMicroLiteController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack()
@@ -280,7 +280,7 @@ public void TheTransactionIsRolledBack()
280280

281281
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndAnActiveTransaction
282282
{
283-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
283+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
284284
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
285285

286286
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndAnActiveTransaction()
@@ -320,7 +320,7 @@ public void TheTransactionIsNotRolledBack()
320320

321321
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndAutoManageTransactionIsFalse
322322
{
323-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
323+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
324324
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
325325

326326
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndAutoManageTransactionIsFalse()
@@ -363,7 +363,7 @@ public void TheTransactionIsNotRolledBack()
363363

364364
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndCommittingAnActiveTransactionThrowsAnException
365365
{
366-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
366+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
367367
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
368368

369369
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndCommittingAnActiveTransactionThrowsAnException()
@@ -405,7 +405,7 @@ public void TheTransactionIsNotRolledBack()
405405

406406
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndNoActiveTransaction
407407
{
408-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
408+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
409409
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
410410

411411
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndNoActiveTransaction()
@@ -445,7 +445,7 @@ public void TheTransactionIsNotRolledBack()
445445

446446
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndNoCurrentTransaction
447447
{
448-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
448+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
449449

450450
[Fact]
451451
public void OnActionExecutedDoesNotThrowAnException()
@@ -465,7 +465,7 @@ public void OnActionExecutedDoesNotThrowAnException()
465465

466466
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack
467467
{
468-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
468+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
469469
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
470470

471471
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack()
@@ -506,7 +506,7 @@ public void TheTransactionIsNotRolledBackAgain()
506506

507507
public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack
508508
{
509-
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
509+
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
510510
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();
511511

512512
public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack()
@@ -547,7 +547,7 @@ public void TheTransactionIsRolledBack()
547547

548548
public class WhenCallingOnActionExecuting_WithAMicroLiteController
549549
{
550-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
550+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
551551

552552
public WhenCallingOnActionExecuting_WithAMicroLiteController()
553553
{
@@ -571,7 +571,7 @@ public void ATransactionIsStarted()
571571

572572
public class WhenCallingOnActionExecuting_WithAMicroLiteController_AndAutoManageTransactionIsFalse
573573
{
574-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
574+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
575575

576576
public WhenCallingOnActionExecuting_WithAMicroLiteController_AndAutoManageTransactionIsFalse()
577577
{
@@ -598,7 +598,7 @@ public void ATransactionIsNotStarted()
598598

599599
public class WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyController
600600
{
601-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
601+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
602602

603603
public WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyController()
604604
{
@@ -622,7 +622,7 @@ public void ATransactionIsStarted()
622622

623623
public class WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyController_AndAutoManageTransactionIsFalse
624624
{
625-
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
625+
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
626626

627627
public WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyController_AndAutoManageTransactionIsFalse()
628628
{

MicroLite.Extensions.Mvc.Tests/MicroLite.Extensions.Mvc.Tests.csproj

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
4747
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
4848
</Reference>
49-
<Reference Include="MicroLite, Version=6.3.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
50-
<HintPath>..\packages\MicroLite.6.3.1\lib\net46\MicroLite.dll</HintPath>
49+
<Reference Include="MicroLite, Version=7.0.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
50+
<HintPath>..\packages\MicroLite.7.0.0\lib\net45\MicroLite.dll</HintPath>
5151
</Reference>
52+
<Reference Include="Microsoft.CSharp" />
5253
<Reference Include="Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
5354
<HintPath>..\packages\Microsoft.CodeCoverage.16.5.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>
5455
</Reference>
@@ -86,6 +87,8 @@
8687
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8788
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
8889
</Reference>
90+
<Reference Include="System.Xml" />
91+
<Reference Include="System.Xml.Linq" />
8992
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
9093
<HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
9194
</Reference>
@@ -111,17 +114,18 @@
111114
<None Include="..\MicroLite.snk">
112115
<Link>MicroLite.snk</Link>
113116
</None>
117+
<None Include="app.config" />
114118
<None Include="packages.config" />
115119
</ItemGroup>
116-
<ItemGroup>
117-
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
118-
</ItemGroup>
119120
<ItemGroup>
120121
<ProjectReference Include="..\MicroLite.Extensions.Mvc\MicroLite.Extensions.Mvc.csproj">
121122
<Project>{14de51d4-3029-441d-b001-555660eb065d}</Project>
122123
<Name>MicroLite.Extensions.Mvc</Name>
123124
</ProjectReference>
124125
</ItemGroup>
126+
<ItemGroup>
127+
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
128+
</ItemGroup>
125129
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
126130
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
127131
<PropertyGroup>
@@ -138,4 +142,4 @@
138142
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
139143
<Import Project="..\packages\Microsoft.CodeCoverage.16.5.0\build\netstandard1.0\Microsoft.CodeCoverage.targets" Condition="Exists('..\packages\Microsoft.CodeCoverage.16.5.0\build\netstandard1.0\Microsoft.CodeCoverage.targets')" />
140144
<Import Project="..\packages\Microsoft.NET.Test.Sdk.16.5.0\build\net40\Microsoft.NET.Test.Sdk.targets" Condition="Exists('..\packages\Microsoft.NET.Test.Sdk.16.5.0\build\net40\Microsoft.NET.Test.Sdk.targets')" />
141-
</Project>
145+
</Project>

MicroLite.Extensions.Mvc.Tests/MicroLiteControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class MicroLiteControllerTests
1111
public class WhenConstructedWithAnISession
1212
{
1313
private readonly MicroLiteController _controller;
14-
private readonly IAsyncSession _session = new Mock<IAsyncSession>().Object;
14+
private readonly ISession _session = new Mock<ISession>().Object;
1515

1616
public WhenConstructedWithAnISession()
1717
{

MicroLite.Extensions.Mvc.Tests/MicroLiteReadOnlyControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class MicroLiteReadOnlyControllerTests
1111
public class WhenConstructedWithAnIReadOnlySession
1212
{
1313
private readonly MicroLiteReadOnlyController _controller;
14-
private readonly IAsyncReadOnlySession _session = new Mock<IAsyncReadOnlySession>().Object;
14+
private readonly IReadOnlySession _session = new Mock<IReadOnlySession>().Object;
1515

1616
public WhenConstructedWithAnIReadOnlySession()
1717
{

MicroLite.Extensions.Mvc.Tests/Properties/AssemblyInfo.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[assembly: AssemblyTitle("MicroLite.Extensions.Mvc.Tests")]
99
[assembly: AssemblyDescription("Unit Tests for the MicroLite.Extensions.Mvc library")]
1010
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
11+
[assembly: AssemblyCompany("Project Contributors")]
1212
[assembly: AssemblyProduct("MicroLite.Extensions.Mvc.Tests")]
1313
[assembly: AssemblyCopyright("Copyright Project Contributors all rights reserved.")]
1414
[assembly: AssemblyTrademark("")]
@@ -28,6 +28,9 @@
2828
// Minor Version
2929
// Build Number
3030
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
3134
[assembly: AssemblyVersion("1.0.0.0")]
3235
[assembly: AssemblyFileVersion("1.0.0.0")]
33-
[assembly: CollectionBehavior(DisableTestParallelization = true)]
36+
[assembly: CollectionBehavior(DisableTestParallelization = true)]

MicroLite.Extensions.Mvc.Tests/ValidateModelNotNullAttributeTests.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
namespace MicroLite.Extensions.Mvc.Tests
2-
{
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Web.Mvc;
6-
using MicroLite.Extensions.Mvc;
7-
using Xunit;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Web.Mvc;
4+
using Xunit;
85

6+
namespace MicroLite.Extensions.Mvc.Tests
7+
{
98
public class ValidateModelNotNullAttributeTests
109
{
1110
public class WhenCallingOnActionExecuting_AndTheActionArgumentsDoesNotContainNull

MicroLite.Extensions.Mvc.Tests/ValidateModelStateAttributeTests.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
namespace MicroLite.Extensions.Mvc.Tests
2-
{
3-
using System.Web.Mvc;
4-
using MicroLite.Extensions.Mvc;
5-
using Moq;
6-
using Xunit;
1+
using System.Web.Mvc;
2+
using Moq;
3+
using Xunit;
74

5+
namespace MicroLite.Extensions.Mvc.Tests
6+
{
87
public class ValidateModelStateAttributeTests
98
{
109
public class WhenCallingOnActionExecuting_AndTheModelStateDoesNotContainErrors

0 commit comments

Comments
 (0)