diff --git a/src/test/java/com/fanruan/api/decision/AuthorityKitTest.java b/src/test/java/com/fanruan/api/decision/AuthorityKitTest.java new file mode 100644 index 0000000..ebf3366 --- /dev/null +++ b/src/test/java/com/fanruan/api/decision/AuthorityKitTest.java @@ -0,0 +1,30 @@ +package com.fanruan.api.decision; + +import org.junit.Assert; +import org.junit.Test; + +import java.lang.reflect.Method; + +/** + * @author Zed + * @version 10.0 + * Created by Zed on 2020/4/30 + */ +public class AuthorityKitTest { + + @Test + public void setAuth() throws Exception { + + Class classBook = Class.forName("com.fanruan.api.decision.AuthorityKit"); + Assert.assertNotNull(classBook); + + Method method1 = classBook.getDeclaredMethod("setCustomRoleAuth", String.class, int.class, String.class, int.class); + Assert.assertNotNull(method1); + + Method method2 = classBook.getDeclaredMethod("setUserAuth", String.class, int.class, String.class, int.class); + Assert.assertNotNull(method2); + + Method method3 = classBook.getDeclaredMethod("setDepAuth", String.class, int.class, String.class, int.class); + Assert.assertNotNull(method3); + } +} diff --git a/src/test/java/com/fanruan/api/decision/role/CustomRoleKitTest.java b/src/test/java/com/fanruan/api/decision/role/CustomRoleKitTest.java new file mode 100644 index 0000000..e3b1289 --- /dev/null +++ b/src/test/java/com/fanruan/api/decision/role/CustomRoleKitTest.java @@ -0,0 +1,24 @@ +package com.fanruan.api.decision.role; + +import org.junit.Assert; +import org.junit.Test; + +import java.lang.reflect.Method; + +/** + * @author Zed + * @version 10.0 + * Created by Zed on 2020/4/30 + */ +public class CustomRoleKitTest { + + @Test + public void getCustomRoleIds() throws Exception { + + Class classBook = Class.forName("com.fanruan.api.decision.role.CustomRoleKit"); + Assert.assertNotNull(classBook); + + Method method1 = classBook.getDeclaredMethod("getCustomRoleIds", String.class, String.class); + Assert.assertNotNull(method1); + } +} diff --git a/src/test/java/com/fanruan/api/decision/user/UserKitTest.java b/src/test/java/com/fanruan/api/decision/user/UserKitTest.java new file mode 100644 index 0000000..92c2f08 --- /dev/null +++ b/src/test/java/com/fanruan/api/decision/user/UserKitTest.java @@ -0,0 +1,25 @@ +package com.fanruan.api.decision.user; + +import org.junit.Assert; +import org.junit.Test; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; + +/** + * @author Zed + * @version 10.0 + * Created by Zed on 2020/4/30 + */ +public class UserKitTest { + + @Test + public void getCurrentUserId() throws Exception { + + Class classBook = Class.forName("com.fanruan.api.decision.user.UserKit"); + Assert.assertNotNull(classBook); + + Method method1 = classBook.getDeclaredMethod("getCurrentUserId", HttpServletRequest.class); + Assert.assertNotNull(method1); + } +}