@@ -0,0 +1,1087 @@
+import org.apache.shiro.authz.UnauthorizedException;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * Created by Will.Zhang on 2016/11/22 0022 16:20.%0A */%0Apublic class PermissionTest extends BaseTest %7B%0A%0A    @Test%0A    public void testIsPermitted()%7B%0A        login(%22classpath:shiro-permission.ini%22, %22zhang%22, %22123%22);%0A        //%E5%88%A4%E6%96%AD%E6%98%AF%E5%90%A6%E6%8B%A5%E6%9C%89%E6%9D%83%E9%99%90user:create%0A        Assert.assertTrue(getSubject().isPermitted(%22user:create%22));%0A        //%E5%88%A4%E6%96%AD%E6%98%AF%E5%90%A6%E6%8B%A5%E6%9C%89%E6%9D%83%E9%99%90user:create and user:delete%0A        Assert.assertTrue(getSubject().isPermittedAll(%22user:create%22, %22user:delete%22));%0A        //%E5%88%A4%E6%96%AD %E6%B2%A1%E6%9C%89%E6%9D%83%E9%99%90 user:view%0A        Assert.assertFalse(getSubject().isPermitted(%22user:view%22));%0A    %7D%0A%0A    @Test(expected = UnauthorizedException.class)%0A    public void testCheckPermission()%7B%0A        login(%22classpath:shiro-permission.ini%22, %22zhang%22, %22123%22);%0A        //%E6%8B%A5%E6%9C%89%E6%9D%83%E9%99%90 user:create%0A        getSubject().checkPermission(%22user:create%22);%0A        //%E6%8B%A5%E6%9C%89%E6%9D%83%E9%99%90 user:delete and user:update%0A        getSubject().checkPermissions(%22user:delete%22, %22user:update%22);%0A        //%E6%8B%A5%E6%9C%89%E6%9D%83%E9%99%90 user:view %E6%8A%9B%E5%87%BA%E9%94%99%E8%AF%AF%0A        getSubject().checkPermission(%22user:view%22);%0A%0A    %7D%0A%7D%0A

update section3