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>

tests/CommandQuery.AspNetCore.Tests/CommandQueryControllerModelConventionTests.cs

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

97
namespace CommandQuery.AspNetCore.Tests
108
{

tests/CommandQuery.AspNetCore.Tests/QueryControllerFeatureProviderTests.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/QueryControllerTests.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/ServiceCollectionExtensionsTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.AspNetCore.Routing;
88
using Microsoft.Extensions.DependencyInjection;
99
using Microsoft.Extensions.Logging;
10-
using NUnit.Framework;
1110

1211
namespace CommandQuery.AspNetCore.Tests
1312
{

tests/CommandQuery.AzureFunctions.Tests/CommandFunctionTests.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44
using CommandQuery.Exceptions;
55
using CommandQuery.Tests;
66
using FluentAssertions;
7-
using LoFuUnit.AutoMoq;
8-
using LoFuUnit.NUnit;
97
using Microsoft.AspNetCore.Http;
108
using Microsoft.AspNetCore.Mvc;
119
using Microsoft.AspNetCore.Mvc.Infrastructure;
1210
using Microsoft.Azure.Functions.Worker;
1311
using Microsoft.Azure.Functions.Worker.Http;
14-
using Moq;
15-
using NUnit.Framework;
1612

1713
namespace CommandQuery.AzureFunctions.Tests
1814
{
@@ -22,19 +18,17 @@ public class CommandFunctionTests_HttpRequestData : LoFuTest<CommandFunction>
2218
public async Task SetUp()
2319
{
2420
Clear();
25-
Use<Mock<ICommandProcessor>>();
2621
Use<JsonSerializerOptions>(null);
2722

28-
var context = new Mock<FunctionContext>();
29-
Req = new FakeHttpRequestData(context.Object);
23+
Req = new FakeHttpRequestData(One<FunctionContext>());
3024
await Req.Body.WriteAsync(Encoding.UTF8.GetBytes("{}"));
3125
}
3226

3327
[LoFu, Test]
3428
public async Task when_handling_the_command()
3529
{
3630
CommandName = "FakeCommand";
37-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
31+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
3832

3933
async Task should_invoke_the_command_processor()
4034
{
@@ -84,7 +78,7 @@ async Task should_handle_Exception()
8478
public async Task when_handling_the_command_with_result()
8579
{
8680
CommandName = "FakeResultCommand";
87-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
81+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
8882

8983
async Task should_return_the_result_from_the_command_processor()
9084
{
@@ -110,7 +104,6 @@ public class CommandFunctionTests_HttpRequest : LoFuTest<CommandFunction>
110104
public async Task SetUp()
111105
{
112106
Clear();
113-
Use<Mock<ICommandProcessor>>();
114107
Use<JsonSerializerOptions>(null);
115108

116109
var mock = new Mock<HttpRequest>();
@@ -122,7 +115,7 @@ public async Task SetUp()
122115
public async Task when_handling_the_command()
123116
{
124117
CommandName = "FakeCommand";
125-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
118+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeCommand));
126119

127120
async Task should_invoke_the_command_processor()
128121
{
@@ -172,7 +165,7 @@ async Task should_handle_Exception()
172165
public async Task when_handling_the_command_with_result()
173166
{
174167
CommandName = "FakeResultCommand";
175-
The<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
168+
Use<Mock<ICommandProcessor>>().Setup(x => x.GetCommandType(CommandName)).Returns(typeof(FakeResultCommand));
176169

177170
async Task should_return_the_result_from_the_command_processor()
178171
{

tests/CommandQuery.AzureFunctions.Tests/CommandQuery.AzureFunctions.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.AzureFunctions.Tests/Internal/HttpRequestDataExtensionsTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
using FluentAssertions;
44
using Microsoft.Azure.Functions.Worker;
55
using Microsoft.Azure.Functions.Worker.Http;
6-
using Moq;
7-
using NUnit.Framework;
86

97
namespace CommandQuery.AzureFunctions.Tests.Internal
108
{

tests/CommandQuery.AzureFunctions.Tests/Internal/HttpRequestExtensionsTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
using System.Text;
22
using FluentAssertions;
3-
using LoFuUnit.NUnit;
43
using Microsoft.AspNetCore.Http;
5-
using Moq;
6-
using NUnit.Framework;
74

85
namespace CommandQuery.AzureFunctions.Tests.Internal
96
{

0 commit comments

Comments
 (0)