-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from wemogy/85-support-commandquery-definition…
…s-across-multiple-assemblies feat: #85 added support for commands and queries across multiple asse…
- Loading branch information
Showing
12 changed files
with
245 additions
and
125 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
src/core/Wemogy.CQRS.UnitTests.AssemblyA/Commands/TrackUserActivityCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Wemogy.CQRS.Commands.Abstractions; | ||
|
||
namespace Wemogy.CQRS.UnitTests.AssemblyA.Commands; | ||
|
||
public class TrackUserActivityCommand : ICommand | ||
{ | ||
} |
7 changes: 7 additions & 0 deletions
7
src/core/Wemogy.CQRS.UnitTests.AssemblyA/Queries/GetUserActivityQuery.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Wemogy.CQRS.Queries.Abstractions; | ||
|
||
namespace Wemogy.CQRS.UnitTests.AssemblyA.Queries; | ||
|
||
public class GetUserActivityQuery : IQuery<int> | ||
{ | ||
} |
11 changes: 11 additions & 0 deletions
11
src/core/Wemogy.CQRS.UnitTests.AssemblyA/Wemogy.CQRS.UnitTests.AssemblyA.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Wemogy.CQRS\Wemogy.CQRS.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...S.UnitTests/TestApplication/Commands/TrackUserActivity/TrackUserActivityCommandHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Threading.Tasks; | ||
using Wemogy.CQRS.Commands.Abstractions; | ||
using Wemogy.CQRS.UnitTests.AssemblyA.Commands; | ||
|
||
namespace Wemogy.CQRS.UnitTests.TestApplication.Commands.TrackUserActivity; | ||
|
||
public class TrackUserActivityCommandHandler : ICommandHandler<TrackUserActivityCommand> | ||
{ | ||
public static int CalledCount { get; private set; } | ||
public Task HandleAsync(TrackUserActivityCommand command) | ||
{ | ||
CalledCount++; | ||
return Task.CompletedTask; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ogy.CQRS.UnitTests/TestApplication/Queries/GetUserActivity/GetUserActivityQueryHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Wemogy.CQRS.Queries.Abstractions; | ||
using Wemogy.CQRS.UnitTests.AssemblyA.Queries; | ||
|
||
namespace Wemogy.CQRS.UnitTests.TestApplication.Queries.GetUserActivity; | ||
|
||
public class GetUserActivityQueryHandler : IQueryHandler<GetUserActivityQuery, int> | ||
{ | ||
public Task<int> HandleAsync(GetUserActivityQuery query, CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters