Beispiel #1
0
        private void SetupPriority(IPriorityService piorityService, IOperationFactory operationFactory)
        {
            piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Multiplication));
            piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Division));

            piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Add));
            piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Subtract));
        }
Beispiel #2
0
        public void Setup()
        {
            _piorityService = new PriorityService();
            var operationFactory = new OperationFactory();

            _piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Multiplication));
            _piorityService.AddToPiority(1, operationFactory.CreateOperation(OperationEnum.Division));

            _piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Add));
            _piorityService.AddToPiority(2, operationFactory.CreateOperation(OperationEnum.Subtract));

            _calculationService = new CalculationService();
        }