public async Task Handle_InvokeExpectedMethods() { _settings.DefaultAdminLanguageId = "1"; var command = new SendQuantityBelowStoreOwnerCommand() { Product = new Domain.Catalog.Product(), ProductAttributeCombination = null }; await _handler.Handle(command, default); _messageProviderMock.Verify(c => c.SendQuantityBelowStoreOwnerMessage(It.IsAny <Product>(), It.IsAny <string>()), Times.Once); command.ProductAttributeCombination = new ProductAttributeCombination(); await _handler.Handle(command, default); _messageProviderMock.Verify(c => c.SendQuantityBelowStoreOwnerMessage(It.IsAny <Product>(), It.IsAny <ProductAttributeCombination>(), It.IsAny <string>()), Times.Once); }
public async Task ProductAttributeCombinationNotNull() { await _sendQuantityBelowStoreOwnerNotificationCommandHandler.Handle(_request, default); _workflowMessageServiceMock.Verify(x => x.SendQuantityBelowStoreOwnerNotification(It.IsAny <Product>(), It.IsAny <ProductAttributeCombination>(), It.IsAny <string>()), Times.Once); }