まだ雑だけどそのうちもう少し整える
データが複数件書いてあるファイルパスを受け取り、それに対して任意の変換と処理を行うスクリプトがあるとする。それを複数サイズに分割して実行したい。
負荷のために分割をしたり、ひとまず先頭だけを流して結果を検証したりしたいため。
- 国際電話番号とステータスがあるとする
class EitherTest extends Specification { | |
// テスト準備 | |
Either<String, Integer> r = Either.right(5) | |
Either<String, Integer> l = Either.left('parse error') | |
enum ResultType { | |
EVEN, ODD, PARSE_ERROR, RANGE_ERROR | |
} |
class MoreResultTest extends Specification { | |
private static Result result = new Result( | |
Parser.parse(ParserTest.bobio) | |
) | |
def test_enum() { | |
expect: | |
result.as('status', { it == '1' ? Status.OK : Status.NG }) == Status.OK | |
} |
水島宏太 (株式会社ドワンゴ)