Пример #1
0
        private void SimulateDeAllocationIfRequired(AllocatableSalesPerson salesPerson)
        {
            if (!_behaviourConfiguration.DeAllocationTimeSec.HasValue)
            {
                return;
            }

            Task.Delay(_behaviourConfiguration.DeAllocationTimeSec.Value * SECOND_TO_MILLISECOND)
            .ContinueWith(t => salesPerson.Deallocate());
        }
 private static bool Any(AllocatableSalesPerson s)
 => true;
Пример #3
0
 protected void ASalePersonHasBeenAllocated(AllocatableSalesPerson salesPerson)
 => _testModule.SalesPersonStore.FindMatchingSalesPerson(
     s => s.Equals(salesPerson)).Single().AllocateToCustomer();
Пример #4
0
 protected void SalesPersonIsAvailable(AllocatableSalesPerson salesPerson) =>
 _testModule.SalesPersonStore.RegisterNewSalesPerson(salesPerson);
 public static SalesPersonDto FromDomainEntity(
     AllocatableSalesPerson domainSalesPerson)
 => new SalesPersonDto(
     domainSalesPerson.Name,
     domainSalesPerson.IsAllocated);
Пример #6
0
 private bool SalesPersonMatchingCriteria(AllocatableSalesPerson salesPerson)
 => _salesPersonCriteria.Matches(salesPerson);