public async Task ShouldNotPassOrdersIfDispatcherGroupAreDifferent() { DispatcherGroupRule dispatcherGroupRule = new DispatcherGroupRule(_mockGasStationRepo.Object); var result = await dispatcherGroupRule.IsDispatcherSame(_orderData.InputOrders); Assert.False(result); }
public async Task ShouldPassOrdersIfDispatcherGroupIsSame() { DispatcherGroupRule dispatcherGroupRule = new DispatcherGroupRule(_mockGasStationRepo.Object); var result = await dispatcherGroupRule.IsDispatcherSame( _orderData.InputOrders.Take(2)); _mockGasStationRepo.Verify(x => x.FindByAsync(It.IsAny <Expression <Func <GasStation, bool> > >()), Times.Once); Assert.True(result); }