Merge pull request 'Update IEventService functions because of breaking changes' (#4) from bugfixes/testUtilsConsolidation into develop

Reviewed-on: #4
features/nuget_autobuild
Mihael Ocvirk 2 years ago
commit 8aaeeb9d81

@ -1,5 +1,6 @@
using Connected;
using Connected.Notifications.Events;
using Connected.ServiceModel;
using Connected.Services;
using Moq;
@ -58,17 +59,17 @@ internal static class TestUtils
public static Moq.Language.Flow.ISetup<IEventService, Task> SetupEvent<TService, TId>(this Moq.Language.ISetupConditionResult<IEventService> setup, string @event)
{
return setup.Setup(e => e.Enqueue(It.IsAny<TService?>(), @event, It.IsAny<TId>()));
return setup.Setup(e => e.Enqueue(It.IsAny<IOperationState>(), It.IsAny<TService?>(), @event, It.IsAny<TId>()));
}
public static Moq.Language.Flow.ISetup<IEventService, Task> SetupEvent<TService, TId>(this Mock<IEventService> setup, string @event)
{
return setup.Setup(e => e.Enqueue(It.IsAny<TService?>(), @event, It.IsAny<TId>()));
return setup.Setup(e => e.Enqueue(It.IsAny<IOperationState>(), It.IsAny<TService?>(), @event, It.IsAny<TId>()));
}
public static void VerifyEvent<TService, TId>(this Mock<IEventService> setup, string @event)
{
setup.Verify(e => e.Enqueue(It.IsAny<TService?>(), @event, It.IsAny<TId>()), Times.Exactly(1));
setup.Verify(e => e.Enqueue(It.IsAny<IOperationState>(), It.IsAny<TService?>(), @event, It.IsAny<TId>()), Times.Exactly(1));
}
public static void SetupIEnumerable<TEnumerable>(this Mock mock, IEnumerable<TEnumerable> data)

Loading…
Cancel
Save