Fix Handler_sends_no_command_when_order_already_exists test
This commit is contained in:
		
							parent
							
								
									89a42e6c8f
								
							
						
					
					
						commit
						52cdd1645a
					
				| @ -43,6 +43,6 @@ public class CancelOrderIdentifiedCommandHandler : IdentifiedCommandHandler<Canc | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -67,6 +67,6 @@ public class CreateOrderIdentifiedCommandHandler : IdentifiedCommandHandler<Crea | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for creating order. | ||||
|         return true; // Ignore duplicate requests for creating order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -43,6 +43,6 @@ public class SetAwaitingValidationIdentifiedOrderStatusCommandHandler : Identifi | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -46,6 +46,6 @@ public class SetPaidIdentifiedOrderStatusCommandHandler : IdentifiedCommandHandl | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -46,6 +46,6 @@ public class SetStockConfirmedOrderStatusIdentifiedCommandHandler : IdentifiedCo | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -47,6 +47,6 @@ public class SetStockRejectedOrderStatusIdentifiedCommandHandler : IdentifiedCom | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -43,6 +43,6 @@ public class ShipOrderIdentifiedCommandHandler : IdentifiedCommandHandler<ShipOr | ||||
| 
 | ||||
|     protected override bool CreateResultForDuplicateRequest() | ||||
|     { | ||||
|         return true;                // Ignore duplicate requests for processing order. | ||||
|         return true; // Ignore duplicate requests for processing order. | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -26,11 +26,11 @@ public class IdentifiedCommandHandlerTest | ||||
|         _mediator.Setup(x => x.Send(It.IsAny<IRequest<bool>>(), default)) | ||||
|             .Returns(Task.FromResult(true)); | ||||
| 
 | ||||
|         //Act | ||||
|         // Act | ||||
|         var handler = new CreateOrderIdentifiedCommandHandler(_mediator.Object, _requestManager.Object, _loggerMock.Object); | ||||
|         var result = await handler.Handle(fakeOrderCmd, CancellationToken.None); | ||||
| 
 | ||||
|         //Assert | ||||
|         // Assert | ||||
|         Assert.True(result); | ||||
|         _mediator.Verify(x => x.Send(It.IsAny<IRequest<bool>>(), default), Times.Once()); | ||||
|     } | ||||
| @ -48,12 +48,11 @@ public class IdentifiedCommandHandlerTest | ||||
|         _mediator.Setup(x => x.Send(It.IsAny<IRequest<bool>>(), default)) | ||||
|             .Returns(Task.FromResult(true)); | ||||
| 
 | ||||
|         //Act | ||||
|         // Act | ||||
|         var handler = new CreateOrderIdentifiedCommandHandler(_mediator.Object, _requestManager.Object, _loggerMock.Object); | ||||
|         var result = await handler.Handle(fakeOrderCmd, CancellationToken.None); | ||||
| 
 | ||||
|         //Assert | ||||
|         Assert.False(result); | ||||
|         // Assert | ||||
|         _mediator.Verify(x => x.Send(It.IsAny<IRequest<bool>>(), default), Times.Never()); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user