apiControllerTest.ftl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <#import "../function.ftl" as func>
  2. <#assign class=model.variables.class>
  3. <#assign classVar=model.variables.classVar>
  4. <#assign sys=model.variables.sys>
  5. <#assign module=model.variables.module>
  6. <#assign isBaseModule=model.variables.isBaseModule>
  7. <#if isBaseModule = 'true'>
  8. package com.lc.apiservice.${sys}.test.web.controller;
  9. <#else>
  10. package com.lc.apiservice.${sys}.${module}.test.web.controller;
  11. </#if>
  12. import org.junit.Test;
  13. import com.lc.apiservice.APIControllerBaseTest;
  14. /**
  15. * 对象功能: ${model.tabComment} 对外API服务的单元测试类
  16. <#if vars.company?exists>
  17. * 开发公司:${vars.company}
  18. </#if>
  19. <#if vars.developer?exists>
  20. * 开发人员:${vars.developer}
  21. </#if>
  22. * 创建时间:${date?string("yyyy-MM-dd HH:mm:ss")}
  23. */
  24. public class ${class}APIControllerTest extends APIControllerBaseTest{
  25. @Override
  26. public void initRemotePrefix() {
  27. remotePrefix = "http://10.105.13.111:8088";
  28. }
  29. @Override
  30. public void initLocalPrefix() {
  31. localPrefix = "http://localhost:8080/app-apiservice";
  32. }
  33. /**
  34. * 更改这个值切换测试本地或远程
  35. */
  36. @Override
  37. public void initTestLocal() {
  38. testLocal = true;
  39. }
  40. /**
  41. * 测试集合查询
  42. * @throws Exception
  43. */
  44. @Test
  45. public void testList() throws Exception{
  46. }
  47. /**
  48. * 测试新增
  49. * @throws Exception
  50. */
  51. @Test
  52. public void testAdd() throws Exception{
  53. }
  54. /**
  55. * 测试获取单个对象
  56. * @throws Exception
  57. */
  58. @Test
  59. public void testGet() throws Exception{
  60. }
  61. /**
  62. * 测试更新单个对象
  63. * @throws Exception
  64. */
  65. @Test
  66. public void testUpdate() throws Exception{
  67. }
  68. /**
  69. * 测试删除单个对象
  70. * @throws Exception
  71. */
  72. @Test
  73. public void testDelete() throws Exception{
  74. }
  75. }