com.etotem.cfc.controller.ArticleControllerTest.txt 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. -------------------------------------------------------------------------------
  2. Test set: com.etotem.cfc.controller.ArticleControllerTest
  3. -------------------------------------------------------------------------------
  4. Tests run: 11, Failures: 4, Errors: 5, Skipped: 0, Time elapsed: 48.168 s <<< FAILURE! - in com.etotem.cfc.controller.ArticleControllerTest
  5. list_ByCategory Time elapsed: 0.057 s <<< ERROR!
  6. java.lang.NullPointerException
  7. at com.etotem.cfc.controller.ArticleControllerTest.list_ByCategory(ArticleControllerTest.java:90)
  8. recordRead_NoDuration Time elapsed: 0.056 s <<< ERROR!
  9. org.mockito.exceptions.base.MockitoException:
  10. Only void methods can doNothing()!
  11. Example of correct use of doNothing():
  12. doNothing().
  13. doThrow(new RuntimeException())
  14. .when(mock).someVoidMethod();
  15. Above means:
  16. someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called
  17. at com.etotem.cfc.controller.ArticleControllerTest.recordRead_NoDuration(ArticleControllerTest.java:226)
  18. featured_Success Time elapsed: 0.017 s <<< FAILURE!
  19. org.opentest4j.AssertionFailedError: expected: <2> but was: <0>
  20. at com.etotem.cfc.controller.ArticleControllerTest.featured_Success(ArticleControllerTest.java:177)
  21. list_LoggedInUser Time elapsed: 0.018 s <<< FAILURE!
  22. org.opentest4j.AssertionFailedError: expected: not <null>
  23. at com.etotem.cfc.controller.ArticleControllerTest.list_LoggedInUser(ArticleControllerTest.java:132)
  24. list_Success Time elapsed: 0.022 s <<< FAILURE!
  25. org.opentest4j.AssertionFailedError: expected: not <null>
  26. at com.etotem.cfc.controller.ArticleControllerTest.list_Success(ArticleControllerTest.java:70)
  27. recordRead_WithMemberId Time elapsed: 0.013 s <<< ERROR!
  28. org.mockito.exceptions.base.MockitoException:
  29. Only void methods can doNothing()!
  30. Example of correct use of doNothing():
  31. doNothing().
  32. doThrow(new RuntimeException())
  33. .when(mock).someVoidMethod();
  34. Above means:
  35. someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called
  36. at com.etotem.cfc.controller.ArticleControllerTest.recordRead_WithMemberId(ArticleControllerTest.java:215)
  37. featured_DefaultSize Time elapsed: 0.015 s <<< FAILURE!
  38. org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
  39. at com.etotem.cfc.controller.ArticleControllerTest.featured_DefaultSize(ArticleControllerTest.java:190)
  40. list_ByKeyword Time elapsed: 0.01 s <<< ERROR!
  41. java.lang.NullPointerException
  42. at com.etotem.cfc.controller.ArticleControllerTest.list_ByKeyword(ArticleControllerTest.java:109)
  43. recordRead_Success Time elapsed: 0.013 s <<< ERROR!
  44. org.mockito.exceptions.base.MockitoException:
  45. Only void methods can doNothing()!
  46. Example of correct use of doNothing():
  47. doNothing().
  48. doThrow(new RuntimeException())
  49. .when(mock).someVoidMethod();
  50. Above means:
  51. someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called
  52. at com.etotem.cfc.controller.ArticleControllerTest.recordRead_Success(ArticleControllerTest.java:201)