@@ -0,0 +1,1121 @@
+package org.netling.ftp;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.junit.Test;%0Aimport org.netling.ftp.FTPFile.Access;%0Aimport org.netling.ftp.FTPFile.Permission;%0A%0A%0Apublic class FTPFileTest %7B%0A%09%0A%09@Test%0A%09public void testFilePermissions() %7B%0A%09%09// User-leve perms only (700)%0A%09%09FTPFile file = new FTPFile();%0A%09%09file.setPermission(Access.USER, Permission.READ);%0A%09%09file.setPermission(Access.USER, Permission.WRITE);%0A%09%09file.setPermission(Access.USER, Permission.EXECUTE);%0A%09%09assertEquals(%22rwx------%22, file.getPermissionsString());%0A%09%09%0A%09%09// No permissions%0A%09%09file = new FTPFile();%0A%09%09assertEquals(%22---------%22, file.getPermissionsString());%0A%09%09%0A%09%09// 755%0A%09%09file = new FTPFile();%0A%09%09file.setPermission(Access.USER, Permission.READ);%0A%09%09file.setPermission(Access.USER, Permission.WRITE);%0A%09%09file.setPermission(Access.USER, Permission.EXECUTE);%0A%09%09file.setPermission(Access.GROUP, Permission.READ);%0A%09%09file.setPermission(Access.GROUP, Permission.EXECUTE);%0A%09%09file.setPermission(Access.WORLD, Permission.READ);%0A%09%09file.setPermission(Access.WORLD, Permission.EXECUTE);%0A%09%09assertEquals(%22rwxr-xr-x%22,file.getPermissionsString());%0A%09%09%0A%09%7D%0A%09%0A%0A%7D%0A

Add test