Пример #1
0
        public void ShouldWorkNormally()
        {
            // Arrange
            decimal expectedResult = 10m;
            var     response       = BuildResponse(expectedResult);

            // Act
            var sut    = new DailyResultExtractor();
            var result = sut.Extract(response);

            // Assert
            Assert.Equal(expectedResult, result);
        }
        private MotorVehicleRuleExecutor GetSystem()
        {
            var restClient       = new RestClient();
            var openFiscaOptions = new OpenFiscaOptions()
            {
                Url = "https://openfiscacanada-dts-csps-main.dev.dts-stn.com"
            };
            var options = Options.Create(openFiscaOptions);

            var openFiscaLib = new OpenFiscaLib(restClient, options);

            var dailyRequestBuilder      = new DailyRequestBuilder();
            var dailyResultExtractor     = new DailyResultExtractor();
            var aggregateRequestBuilder  = new AggregateRequestBuilder();
            var aggregateResultExtractor = new AggregateResultExtractor();
            var executor = new MotorVehicleRuleExecutor(openFiscaLib, dailyRequestBuilder, aggregateRequestBuilder, dailyResultExtractor, aggregateResultExtractor);

            return(executor);
        }