Example #1
0
        public Task Handle(CreateDollarRateCommand command)
        {
            var dollarToRialChangeRate = new DollarToRialChangeRate(command.Rate);

            _repo.Save(dollarToRialChangeRate);

            return(Task.CompletedTask);
        }
        public void Instantitation_IfChangeRateIsGreatherThanZero_InstaintaitedSuccessfully()
        {
            //Intention revealing
            decimal dollarToRialChangeRate = 240000;
            DollarToRialChangeRate sut     = CreateDollarToRialChangeRate(rate: dollarToRialChangeRate);

            var result = sut.LastChnageRate();

            Assert.Equal(dollarToRialChangeRate, result);
        }