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

Commit

Permalink
Merge pull request #62 from MicroLite-ORM/develop
Browse files Browse the repository at this point in the history
7.0.0
  • Loading branch information
TrevorPilley committed Mar 27, 2020
2 parents e1bdc9c + 3c9beb4 commit 86aa831
Show file tree
Hide file tree
Showing 20 changed files with 123 additions and 127 deletions.
12 changes: 6 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ dotnet_style_prefer_conditional_expression_over_return = true:refactoring
csharp_prefer_simple_default_expression = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_methods = true:refactoring
csharp_style_expression_bodied_constructors = true:refactoring
csharp_style_expression_bodied_operators = true:refactoring
csharp_style_expression_bodied_properties = true:refactoring
csharp_style_expression_bodied_indexers = true:refactoring
csharp_style_expression_bodied_accessors = true:refactoring
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_constructors = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_expression_bodied_lambdas = true:refactoring
csharp_style_expression_bodied_local_functions = true:refactoring

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ bld/
[Ll]og/
[Ll]ogs/

# Visual Studio Code cache/options directory
.vscode/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
28 changes: 0 additions & 28 deletions CustomDictionary.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class AutoManageTransactionAttributeTests
{
public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndAnActiveTransaction
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndAnActiveTransaction()
Expand Down Expand Up @@ -60,7 +60,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndAutoManageTransactionIsFalse
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndAutoManageTransactionIsFalse()
Expand Down Expand Up @@ -109,7 +109,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndCommittingAnActiveTransactionThrowsAnException
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndCommittingAnActiveTransactionThrowsAnException()
Expand Down Expand Up @@ -157,7 +157,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndNoActiveTransaction
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndNoActiveTransaction()
Expand Down Expand Up @@ -203,7 +203,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndNoCurrentTransaction
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();

[Fact]
public void OnActionExecutedDoesNotThrowAnException()
Expand All @@ -228,7 +228,7 @@ public void OnActionExecutedDoesNotThrowAnException()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack()
Expand Down Expand Up @@ -275,7 +275,7 @@ public void TheTransactionIsNotRolledBackAgain()

public class WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteApiController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack()
Expand Down Expand Up @@ -322,7 +322,7 @@ public void TheTransactionIsRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndAnActiveTransaction
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndAnActiveTransaction()
Expand Down Expand Up @@ -368,7 +368,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndAutoManageTransactionIsFalse
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndAutoManageTransactionIsFalse()
Expand Down Expand Up @@ -417,7 +417,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndCommittingAnActiveTransactionThrowsAnException
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndCommittingAnActiveTransactionThrowsAnException()
Expand Down Expand Up @@ -465,7 +465,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndNoActiveTransaction
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndNoActiveTransaction()
Expand Down Expand Up @@ -511,7 +511,7 @@ public void TheTransactionIsNotRolledBack()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndNoCurrentTransaction
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();

[Fact]
public void OnActionExecutedDoesNotThrowAnException()
Expand All @@ -536,7 +536,7 @@ public void OnActionExecutedDoesNotThrowAnException()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndTheContextContainsAnException_AndTheTransactionHasBeenRolledBack()
Expand Down Expand Up @@ -583,7 +583,7 @@ public void TheTransactionIsNotRolledBackAgain()

public class WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack
{
private readonly Mock<IAsyncReadOnlySession> _mockSession = new Mock<IAsyncReadOnlySession>();
private readonly Mock<IReadOnlySession> _mockSession = new Mock<IReadOnlySession>();
private readonly Mock<ITransaction> _mockTransaction = new Mock<ITransaction>();

public WhenCallingOnActionExecuted_WithAMicroLiteReadOnlyApiController_AndTheContextContainsAnException_AndTheTransactionHasNotBeenRolledBack()
Expand Down Expand Up @@ -630,7 +630,7 @@ public void TheTransactionIsRolledBack()

public class WhenCallingOnActionExecuting_WithAMicroLiteApiController
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();

public WhenCallingOnActionExecuting_WithAMicroLiteApiController()
{
Expand All @@ -657,7 +657,7 @@ public void ATransactionIsStarted()

public class WhenCallingOnActionExecuting_WithAMicroLiteApiController_AndAutoManageTransactionIsFalse
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();

public WhenCallingOnActionExecuting_WithAMicroLiteApiController_AndAutoManageTransactionIsFalse()
{
Expand Down Expand Up @@ -687,7 +687,7 @@ public void ATransactionIsNotStarted()

public class WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyApiController
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();

public WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyApiController()
{
Expand All @@ -714,7 +714,7 @@ public void ATransactionIsStarted()

public class WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyApiController_AndAutoManageTransactionIsFalse
{
private readonly Mock<IAsyncSession> _mockSession = new Mock<IAsyncSession>();
private readonly Mock<ISession> _mockSession = new Mock<ISession>();

public WhenCallingOnActionExecuting_WithAMicroLiteReadOnlyApiController_AndAutoManageTransactionIsFalse()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="MicroLite, Version=6.3.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
<HintPath>..\packages\MicroLite.6.3.1\lib\net46\MicroLite.dll</HintPath>
<Reference Include="MicroLite, Version=7.0.0.0, Culture=neutral, PublicKeyToken=08410e6798c4fa37, processorArchitecture=MSIL">
<HintPath>..\packages\MicroLite.7.0.0\lib\net45\MicroLite.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.CodeCoverage.Shim, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeCoverage.16.5.0\lib\net45\Microsoft.VisualStudio.CodeCoverage.Shim.dll</HintPath>
</Reference>
Expand All @@ -75,6 +76,8 @@
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.3\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -103,17 +106,18 @@
<None Include="..\MicroLite.snk">
<Link>MicroLite.snk</Link>
</None>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MicroLite.Extensions.WebApi\MicroLite.Extensions.WebApi.csproj">
<Project>{48714fd3-e87a-4a49-b8fb-2644bd1c577b}</Project>
<Name>MicroLite.Extensions.WebApi</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -130,4 +134,4 @@
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
<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')" />
<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')" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class MicroLiteApiControllerTests
public class WhenConstructedWithAnISession
{
private readonly MicroLiteApiController _controller;
private readonly IAsyncSession _session = new Mock<IAsyncSession>().Object;
private readonly ISession _session = new Mock<ISession>().Object;

public WhenConstructedWithAnISession()
{
Expand Down

0 comments on commit 86aa831

Please sign in to comment.