Example #1
0
        public Procedure GenareteProcedure(decimal price, decimal deduction, TypeDeduction typeDeduction)
        {
            var procedures = new Faker <Procedure>("pt_BR")
                             .CustomInstantiator(p => new Procedure(p.Random.Int(), p.Commerce.ProductName(), p.Random.Words(), price, deduction, typeDeduction));

            return(procedures);
        }
        public void Procedure_CalculationComission_CorrectCalculation(decimal price, decimal deduction, decimal comission, TypeDeduction typeDeduction)
        {
            //Arrange
            var procedure = _managementFixture.GenareteProcedure(price, deduction, typeDeduction);
            //Act
            var resultComission = procedure.CalculateComission();

            //Assert
            resultComission.Should().Equals(comission);
        }