-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into NMSHDB-65-implementat…
…ion-of-the-first-performance-test-scenario
- Loading branch information
Showing
12 changed files
with
140 additions
and
22 deletions.
There are no files selected for viewing
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
22 changes: 12 additions & 10 deletions
22
...ons/ConsumerApi/test/ConsumerApi.Tests.Performance/tools/crypto-sidecar/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
BuildingBlocks/src/DevelopmentKit.Identity/DevelopmentKit.Identity.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
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
2 changes: 1 addition & 1 deletion
2
Modules/Devices/src/Devices.Infrastructure/Devices.Infrastructure.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
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
29 changes: 29 additions & 0 deletions
29
...test/Devices.Application.Tests/Tests/PushNotifications/DatawalletModified/HandlerTests.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,29 @@ | ||
using Backbone.BuildingBlocks.Application.PushNotifications; | ||
using Backbone.Modules.Devices.Application.DomainEvents.Incoming.DatawalletModificationCreated; | ||
using Backbone.Modules.Devices.Domain.DomainEvents.Incoming.DatawalletModificationCreated; | ||
using Backbone.UnitTestTools.BaseClasses; | ||
using FakeItEasy; | ||
using Xunit; | ||
|
||
namespace Backbone.Modules.Devices.Application.Tests.Tests.PushNotifications.DatawalletModified; | ||
|
||
public class HandlerTests : AbstractTestsBase | ||
{ | ||
[Fact] | ||
public async Task Creating_a_Datawallet_modification_sends_a_filtered_notification() | ||
{ | ||
// Arrange | ||
var modifiedByDevice = UnitTestTools.Data.TestDataGenerator.CreateRandomDeviceId(); | ||
var identity = UnitTestTools.Data.TestDataGenerator.CreateRandomIdentityAddress(); | ||
var mockSender = A.Fake<IPushNotificationSender>(); | ||
var handler = new DatawalletModifiedDomainEventHandler(mockSender); | ||
var domainEvent = new DatawalletModifiedDomainEvent { Identity = identity, ModifiedByDevice = modifiedByDevice }; | ||
|
||
// Act | ||
await handler.Handle(domainEvent); | ||
|
||
// Assert | ||
var expectedFilteredDeviceIds = new List<string>([modifiedByDevice.Value]); | ||
A.CallTo(() => mockSender.SendFilteredNotification(identity, A<IPushNotification>._, expectedFilteredDeviceIds, A<CancellationToken>._)).MustHaveHappenedOnceExactly(); | ||
} | ||
} |
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