ダメ人間オンライン

あまり信用しないほうがいい技術メモとか備忘録とかその他雑記

Entries from 2018-06-01 to 1 month

assertjで例外発生のテストをシュッと書く

Exception を throw する可能性のある method のテストを書く時今までは @Test(expected = NantokaException.class) とアノテーションをつけたり try { nantokaService.doNantoka(); } catch (NantokaException e) { assertThat(e.getMessage()).isEqualTo("…

gradle の warning がどこで出てるのかわからない時の調べ方

$ ./gradlew build とかして Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. See https://docs.gradle.org/4.5.1/userguide/command_line_interface.html#sec:command_line_warnings こんなのが返ってきてど…