Ejemplo n.º 1
0
        public async Task ShouldNotPassOrdersIfDispatcherGroupAreDifferent()
        {
            DispatcherGroupRule dispatcherGroupRule = new DispatcherGroupRule(_mockGasStationRepo.Object);
            var result = await dispatcherGroupRule.IsDispatcherSame(_orderData.InputOrders);

            Assert.False(result);
        }
Ejemplo n.º 2
0
        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);
        }