質問編集履歴

2

stackoverflow記載追記

2019/07/25 12:35

投稿

mh0223
mh0223

スコア6

test CHANGED
File without changes
test CHANGED
@@ -273,3 +273,7 @@
273
273
 
274
274
 
275
275
  ```
276
+
277
+ 上記質問は[stackoverflow](https://ja.stackoverflow.com/questions/56891/junitspringbootjparepository-saveandflush%e3%81%a7mockit-dothrow%e3%82%92%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%a6%e3%82%82exception%e3%81%8c%e7%99%ba%e7%94%9f)でも投稿しています。
278
+
279
+ ※stackoverflowで回答・解決があった場合は、teratailにも記載します。

1

Exceptionが発生したソースコードのservice.insert("user");をservice.insert(userMst);に修正

2019/07/25 12:35

投稿

mh0223
mh0223

スコア6

test CHANGED
File without changes
test CHANGED
@@ -256,7 +256,7 @@
256
256
 
257
257
  doThrow(new NullPointerException()).when(rep).saveAndFlush(userMst);
258
258
 
259
- actual = service.insert("user");
259
+ actual = service.insert(userMst);
260
260
 
261
261
  }catch(Exception e)
262
262