{"id":59,"date":"2019-05-17T10:12:30","date_gmt":"2019-05-17T01:12:30","guid":{"rendered":"http:\/\/2019se3.satoshis.jp\/?p=59"},"modified":"2019-05-21T09:59:05","modified_gmt":"2019-05-21T00:59:05","slug":"5%e6%9c%8817%e6%97%a5","status":"publish","type":"post","link":"https:\/\/2019se3.satoshis.jp\/?p=59","title":{"rendered":"5\u670817\u65e5"},"content":{"rendered":"<h2>git\u3092\u4f7f\u7528\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406<\/h2>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066[\u30c1\u30fc\u30e0]-[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5171\u7528] \u3092\u9078\u629e\u3059\u308b\u3002<br \/>\nGit\u3068SVN\u304c\u3042\u308b\u306e\u3067Git\u3092\u9078\u629e\u3057\u3066\u300c\u6b21\u3078\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3002<br \/>\n\u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u306e\u300c\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<br \/>\n\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3057\u3066\u300c\u5b8c\u4e86\u300d\u3092\u30af\u30ea\u30c3\u30af\u3002<\/p>\n<h3>.gitignore \u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/h3>\n<p>.gitignore\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u3001Git\u306e\u7ba1\u7406\u5bfe\u8c61\u5916\u306b\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3059\u308b\u3002<br \/>\n\u4f8b\u3048\u3070\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u7ba1\u7406\u4e0d\u8981\u3067\u3042\u308b\u3002<\/p>\n<p>.gitignore\u30d5\u30a1\u30a4\u30eb\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30e9\u306e\u53f3\u306b\u3042\u308b\u300c\u25bd\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3002<br \/>\n\u30e1\u30cb\u30e5\u30fc\u3067\u300c\u30d5\u30a3\u30eb\u30bf\u30fc\u300d\u3092\u9078\u629e\u3057\u3066\u300c.*\u30ea\u30bd\u30fc\u30b9\u300d\u306e\u30c1\u30a7\u30c3\u30af\u3092\u5916\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\/bin\/\r\n\/.settings\r\n.project\r\n.classpath\r\n*.class\r\n*.jar\r\n<\/pre>\n<p>Git\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u767b\u9332\u3059\u308b\u3053\u3068\u3092\u300c\u30b3\u30df\u30c3\u30c8\u300d\u3068\u547c\u3076\u3002<\/p>\n<p>\u81ea\u52d5\u8ca9\u58f2\u6a5f\u306e\u5b9f\u88c5\u306b\u623b\u308b\u3002<\/p>\n<p>\u524d\u56de\u3001\u30c6\u30b9\u30c8\u304c\u30a8\u30e9\u30fc\u306b\u306a\u308b\u72b6\u614b\u3067\u7d42\u308f\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u307f\u308b\u3002<br \/>\n10\u5186\u3092\u6295\u5165\u3057\u3066\u6295\u5165\u91d1\u984d\u306e\u5408\u8a08\u3092\u53d6\u5f97\u3059\u308b\u30680\u5186\u306a\u306e\u3067\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\nimport static org.hamcrest.CoreMatchers.*;\r\nimport static org.junit.Assert.*;\r\n\r\nimport org.junit.jupiter.api.Test;\r\n\r\nclass VendingMachineTest {\r\n\r\n\t@Test\r\n\tvoid \u304a\u91d1\u3092\u6295\u5165\u3059\u308b() {\r\n\t\tVendingMachine vm = new VendingMachine();\r\n\t\tvm.put(10);\r\n\t\tint total = vm.getTotal();\r\n\t\tassertThat(total, is(10));\r\n\t}\r\n\r\n}\r\n<\/pre>\n<p>fake\u3067getTotal()\u306710\u3092\u8fd4\u3059\u3088\u3046\u306b\u3059\u308c\u3070\u30c6\u30b9\u30c8\u306b\u30d1\u30b9\u3059\u308b\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\npublic class VendingMachine {\r\n\r\n\tpublic void put(int i) {\r\n\r\n\t}\r\n\r\n\tpublic int getTotal() {\r\n\t\treturn 10;\r\n\t}\r\n\r\n}\r\n<\/pre>\n<p>\u30c6\u30b9\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\nimport static org.hamcrest.CoreMatchers.*;\r\nimport static org.junit.Assert.*;\r\n\r\nimport org.junit.jupiter.api.Test;\r\n\r\nclass VendingMachineTest {\r\n\r\n\t@Test\r\n\tvoid \u304a\u91d1\u3092\u6295\u5165\u3059\u308b() {\r\n\t\tVendingMachine vm = new VendingMachine();\r\n\t\tvm.put(10);\r\n\t\tint total = vm.getTotal();\r\n\t\tassertThat(total, is(10));\r\n\t\tvm.put(100);\r\n\t\ttotal = vm.getTotal();\r\n\t\tassertThat(total, is(110));\r\n\t}\r\n\r\n}\r\n<\/pre>\n<p>\u30c6\u30b9\u30c8\u306b\u30d1\u30b9\u3059\u308b\u3088\u3046\u306b\u5b9f\u88c5\u3092\u884c\u3046\u3002<\/p>\n<p>\u30c6\u30b9\u30c8\u306b\u30d1\u30b9\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092Git\u306b\u767b\u9332\u3059\u308b\u3002<br \/>\n\u767b\u9332\u3059\u308b\u3053\u3068\u3092\u30b3\u30df\u30c3\u30c8\u3068\u3044\u3046\u3002<br \/>\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001[\u30c1\u30fc\u30e0]-[\u30b3\u30df\u30c3\u30c8]\u3092\u9078\u629e\u3059\u308b\u3002<br \/>\n\u30b3\u30df\u30c3\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5165\u529b\u3059\u308b\u3002<br \/>\n\u767b\u9332\u3057\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u304c\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u306b\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066[\u30b3\u30df\u30c3\u30c8]\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3002<\/p>\n<p>\u4ee5\u4e0b\u3001\u6295\u5165\u3067\u304d\u306a\u3044\u304a\u91d1\u3068\u8fd4\u91d1\u3092\u8ffd\u52a0\u3057\u305f\u30c6\u30b9\u30c8\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\nimport static org.hamcrest.CoreMatchers.*;\r\nimport static org.junit.Assert.*;\r\n\r\nimport org.junit.jupiter.api.Test;\r\n\r\nclass VendingMachineTest {\r\n\r\n\t@Test\r\n\tvoid \u304a\u91d1\u3092\u6295\u5165\u3059\u308b() {\r\n\t\tVendingMachine vm = new VendingMachine();\r\n\t\tvm.put(10);\r\n\t\tint total = vm.getTotal();\r\n\t\tassertThat(total, is(10));\r\n\t\tvm.put(100);\r\n\t\ttotal = vm.getTotal();\r\n\t\tassertThat(total, is(110));\r\n\t}\r\n\r\n\t@Test\r\n\tvoid \u6295\u5165\u3067\u304d\u306a\u3044\u304a\u91d1() {\r\n\t\tVendingMachine vm = new VendingMachine();\r\n\t\tvm.put(1);\r\n\t\tint total = vm.getTotal();\r\n\t\tassertThat(total, is(0));\r\n\t}\r\n\r\n\t@Test\r\n\tvoid \u8fd4\u91d1\u3059\u308b() {\r\n\t\tVendingMachine vm = new VendingMachine();\r\n\t\tvm.put(1000);\r\n\t\tint total = vm.getTotal();\r\n\t\tassertThat(total, is(1000));\r\n\t\tint refund = vm.refund();\r\n\t\ttotal = vm.getTotal();\r\n\t\tassertThat(total, is(0));\r\n\t\tassertThat(refund, is(1000));\r\n\t}\r\n}\r\n<\/pre>\n<p>1\u5186\u3092\u6295\u5165\u3055\u308c\u3066\u3082\u5408\u8a08\u91d1\u984d\u306b\u52a0\u7b97\u3057\u306a\u3044\u3002<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\npackage jp.abc;\r\n\r\npublic class VendingMachine {\r\n\tprivate int total;\r\n\r\n\tpublic VendingMachine() {\r\n\t\ttotal = 0;\r\n\t}\r\n\r\n\tpublic void put(int i) {\r\n\t\tif (i == 1) return;\r\n\t\ttotal += i;\r\n\t}\r\n\r\n\tpublic int getTotal() {\r\n\t\treturn total;\r\n\t}\r\n\r\n\tpublic int refund() {\r\n\t\treturn 0;\r\n\t}\r\n\r\n}\r\n<\/pre>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>git\u3092\u4f7f\u7528\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406 \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066[\u30c1\u30fc\u30e0]-[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5171\u7528] \u3092\u9078\u629e\u3059\u308b\u3002 Git\u3068SVN\u304c\u3042\u308b\u306e\u3067Git\u3092\u9078\u629e\u3057\u3066\u300c\u6b21\u3078\u300d\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3002 \u30ea\u30dd\u30b8\u30c8\u30ea\u30fc\u306e\u300c\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3 &hellip; <a href=\"https:\/\/2019se3.satoshis.jp\/?p=59\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;5\u670817\u65e5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,2],"tags":[],"_links":{"self":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/59"}],"collection":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59"}],"version-history":[{"count":5,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions\/64"}],"wp:attachment":[{"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2019se3.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}