Created
July 30, 2020 11:55
-
-
Save eliasnogueira/ebdec1fcb2d52403fd9647ca947225d9 to your computer and use it in GitHub Desktop.
Blog post about Data Management - JUnitCSVSourceTest code snippet
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 JUnitCSVSourceTest { | |
private static final String MAXIMUM_PRICE = "30.0"; | |
@CsvFileSource(resources = "/products.csv", numLinesToSkip = 1) | |
void productsLassThan(String product, BigDecimal amount) { | |
assertThat(product).isNotEmpty(); | |
assertThat(amount).isLessThanOrEqualTo(new BigDecimal(MAXIMUM_PRICE)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment