Update IEventService functions because of breaking changes
This commit is contained in:
		
							parent
							
								
									f971b8d8a3
								
							
						
					
					
						commit
						d2199bc2d7
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user