50 正しいテストデータが常に存在する 前提でテストを書いてもよいことにする @Test public void test_foo() throws Exception { User user = userService.find(5L); Result result = fooService.doBar(user); assertThat(result)........ 会員番号5番のuserはこのテストに必 要なデータを全て持っている
51 ただし基本は勉強したうえで 用法用量を守って。 @Test public void test_foo() throws Exception { User user = new User(); user.setHoge = ...//テストに必要な値をその都度書く Result result = fooService.doBar(user); assertThat(result)........
62 前提:アプリは組込Tomcatで起動 public class APStarter { public static start() { Tomcat tomcat = new Tomcat(); tomcat.start(); ... public static void main(String args[] argv) { start();
72 巨大ログをよくよく目grepすると ==> default: Existing lock /var/run/yum.pid: another copy is running as pid 3744. ==> default: Another app is currently holding the yum lock; waiting for it to exit... ==> default: The other application is: yum ● テストではなくvagrant の段階 ! ● yum install hogehoge でコケている。 ● 他のyumが動いている??