4 ms·
Spock is the most readable framework for testing java IMO, their data driven testing is great, but it might not be a fair comparison because it's written with g
by nowimaman 3y ago
Spock is the most readable framework for testing java IMO, their data driven testing is great, but it might not be a fair comparison because it's written with groovy:
def 'split #input with sep #sep should return #expected'() {
expect:
Split(input, sep) == expected
where:
testCase | input | sep || expected
"simple" | "a/b/c" | "/" || ['a', 'b', 'c']
"wrong sep" | "a/b/c" | "," || ['a/b/c']
"no sep" | "abc" | "/" || ['abc']
"trailing sep"| "a/b/c/"| "/" || ['a', 'b', 'c']
}