Skip to content

Commit 6287e81

Browse files
committed
bump
1 parent 5ab476b commit 6287e81

File tree

50 files changed

+45
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+45
-169
lines changed

tests/CommandQuery.AWSLambda.Tests/CommandFunctionTests.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
using CommandQuery.Exceptions;
55
using CommandQuery.Tests;
66
using FluentAssertions;
7-
using LoFuUnit.AutoMoq;
8-
using LoFuUnit.NUnit;
9-
using Moq;
10-
using NUnit.Framework;
117

128
namespace CommandQuery.AWSLambda.Tests
139
{
@@ -17,17 +13,16 @@ public class CommandFunctionTests_APIGatewayProxyRequest : LoFuTest<CommandFunct
1713
public void SetUp()
1814
{
1915
Clear();
20-
Use<Mock<ICommandProcessor>>();
2116
Use<JsonSerializerOptions>(null);
22-
Logger = new Mock<ILambdaLogger>().Object;
17+
Logger = One<ILambdaLogger>();
2318
Request = new APIGatewayProxyRequest { Body = "{}" };
2419
}
2520

2621
[LoFu, Test]
2722
public async Task when_handling_the_command()
2823
{
2924
CommandName = "FakeCommand";
30-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
25+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
3126

3227
async Task should_invoke_the_command_processor()
3328
{
@@ -75,7 +70,7 @@ async Task should_handle_Exception()
7570
public async Task when_handling_the_command_with_result()
7671
{
7772
CommandName = "FakeResultCommand";
78-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
73+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
7974

8075
async Task should_return_the_result_from_the_command_processor()
8176
{
@@ -100,17 +95,16 @@ public class CommandFunctionTests_APIGatewayHttpApiV2ProxyRequest : LoFuTest<Com
10095
public void SetUp()
10196
{
10297
Clear();
103-
Use<Mock<ICommandProcessor>>();
10498
Use<JsonSerializerOptions>(null);
105-
Logger = new Mock<ILambdaLogger>().Object;
99+
Logger = One<ILambdaLogger>();
106100
Request = new APIGatewayHttpApiV2ProxyRequest { Body = "{}" };
107101
}
108102

109103
[LoFu, Test]
110104
public async Task when_handling_the_command()
111105
{
112106
CommandName = "FakeCommand";
113-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
107+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
114108

115109
async Task should_invoke_the_command_processor()
116110
{
@@ -158,7 +152,7 @@ async Task should_handle_Exception()
158152
public async Task when_handling_the_command_with_result()
159153
{
160154
CommandName = "FakeResultCommand";
161-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
155+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
162156

163157
async Task should_return_the_result_from_the_command_processor()
164158
{

tests/CommandQuery.AWSLambda.Tests/CommandQuery.AWSLambda.Tests.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="FluentAssertions" Version="6.12.0" />
17-
<PackageReference Include="LoFuUnit.AutoMoq" Version="3.0.0" />
18-
<PackageReference Include="LoFuUnit.NUnit" Version="3.0.0" />
17+
<PackageReference Include="LoFuUnit.AutoMoq" Version="4.0.0-preview.1" />
18+
<PackageReference Include="LoFuUnit.NUnit" Version="4.0.0-preview.1" />
1919
<PackageReference Include="Microsoft.CodeCoverage" Version="17.10.0" />
20-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
21-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
22-
<PrivateAssets>all</PrivateAssets>
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
</PackageReference>
2520
</ItemGroup>
2621

2722
<ItemGroup>

tests/CommandQuery.AWSLambda.Tests/Internal/APIGatewayHttpApiV2ProxyRequestExtensionsTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Amazon.Lambda.APIGatewayEvents;
22
using FluentAssertions;
3-
using NUnit.Framework;
43

54
namespace CommandQuery.AWSLambda.Tests.Internal
65
{

tests/CommandQuery.AWSLambda.Tests/Internal/APIGatewayProxyRequestExtensionsTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Amazon.Lambda.APIGatewayEvents;
22
using CommandQuery.Exceptions;
33
using FluentAssertions;
4-
using NUnit.Framework;
54

65
namespace CommandQuery.AWSLambda.Tests.Internal
76
{

tests/CommandQuery.AWSLambda.Tests/QueryFunctionTests.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
using CommandQuery.Exceptions;
55
using CommandQuery.Tests;
66
using FluentAssertions;
7-
using LoFuUnit.AutoMoq;
8-
using LoFuUnit.NUnit;
9-
using Moq;
10-
using NUnit.Framework;
117

128
namespace CommandQuery.AWSLambda.Tests
139
{
@@ -17,11 +13,10 @@ public class QueryFunctionTests_APIGatewayProxyRequest : LoFuTest<QueryFunction>
1713
public void SetUp()
1814
{
1915
Clear();
20-
Use<Mock<IQueryProcessor>>();
21-
Use<JsonSerializerOptions>(null);
22-
Logger = new Mock<ILambdaLogger>().Object;
2316
QueryName = "FakeQuery";
24-
The<Mock<IQueryProcessor>>().Setup(x => x.GetQueryType(QueryName)).Returns(typeof(FakeQuery));
17+
Use<Mock<IQueryProcessor>>().Setup(x => x.GetQueryType(QueryName)).Returns(typeof(FakeQuery));
18+
Use<JsonSerializerOptions>(null);
19+
Logger = One<ILambdaLogger>();
2520
}
2621

2722
[LoFu, Test]
@@ -102,11 +97,10 @@ public class QueryFunctionTests_APIGatewayHttpApiV2ProxyRequest : LoFuTest<Query
10297
public void SetUp()
10398
{
10499
Clear();
105-
Use<Mock<IQueryProcessor>>();
106-
Use<JsonSerializerOptions>(null);
107-
Logger = new Mock<ILambdaLogger>().Object;
108100
QueryName = "FakeQuery";
109-
The<Mock<IQueryProcessor>>().Setup(x => x.GetQueryType(QueryName)).Returns(typeof(FakeQuery));
101+
Use<Mock<IQueryProcessor>>().Setup(x => x.GetQueryType(QueryName)).Returns(typeof(FakeQuery));
102+
Use<JsonSerializerOptions>(null);
103+
Logger = One<ILambdaLogger>();
110104
}
111105

112106
[LoFu, Test]

tests/CommandQuery.AWSLambda.Tests/ServiceCollectionExtensionsTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using CommandQuery.Tests;
22
using FluentAssertions;
33
using Microsoft.Extensions.DependencyInjection;
4-
using NUnit.Framework;
54

65
namespace CommandQuery.AWSLambda.Tests
76
{

tests/CommandQuery.AspNetCore.Tests/CommandControllerFeatureProviderTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System.Reflection;
22
using CommandQuery.Tests;
33
using FluentAssertions;
4-
using LoFuUnit.NUnit;
54
using Microsoft.AspNetCore.Mvc.Controllers;
6-
using NUnit.Framework;
75

86
namespace CommandQuery.AspNetCore.Tests
97
{

tests/CommandQuery.AspNetCore.Tests/CommandControllerWithResultTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using CommandQuery.Exceptions;
22
using CommandQuery.Tests;
33
using FluentAssertions;
4-
using LoFuUnit.NUnit;
54
using Microsoft.AspNetCore.Mvc;
65
using Microsoft.Extensions.Logging;
7-
using Moq;
8-
using NUnit.Framework;
96

107
namespace CommandQuery.AspNetCore.Tests
118
{

tests/CommandQuery.AspNetCore.Tests/CommandControllerWithoutResultTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using CommandQuery.Exceptions;
22
using CommandQuery.Tests;
33
using FluentAssertions;
4-
using LoFuUnit.NUnit;
54
using Microsoft.AspNetCore.Mvc;
65
using Microsoft.Extensions.Logging;
7-
using Moq;
8-
using NUnit.Framework;
96

107
namespace CommandQuery.AspNetCore.Tests
118
{

tests/CommandQuery.AspNetCore.Tests/CommandQuery.AspNetCore.Tests.csproj

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="FluentAssertions" Version="6.12.0" />
17-
<PackageReference Include="LoFuUnit.AutoMoq" Version="3.0.0" />
18-
<PackageReference Include="LoFuUnit.NUnit" Version="3.0.0" />
17+
<PackageReference Include="LoFuUnit.AutoMoq" Version="4.0.0-preview.1" />
18+
<PackageReference Include="LoFuUnit.NUnit" Version="4.0.0-preview.1" />
1919
<PackageReference Include="Microsoft.CodeCoverage" Version="17.10.0" />
20-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
21-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
22-
<PrivateAssets>all</PrivateAssets>
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
</PackageReference>
2520
</ItemGroup>
2621

2722
<ItemGroup>

0 commit comments

Comments
 (0)