Created
May 4, 2019 18:53
-
-
Save AlicanAkkus/ba12b407c91e4b0fd2d9d80d7bfb5c20 to your computer and use it in GitHub Desktop.
spock test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OrderCommissionCalculatorTest extends Specification { | |
def orderCommissionCalculator = new OrderCommissionCalculator() | |
void "should calculate order commission amount"() { | |
expect: | |
expectedAmount == orderCommissionCalculator.calculate(paymentType, price) | |
where: | |
paymentType | price | expectedAmount | |
"CARD" | 100 | 2.3 | |
"CARD" | 80 | 1.84 | |
"CASH" | 100 | 2.0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment