Grant() public static method

public static Grant ( Permission current, Permission grant ) : Permission
current Permission
grant Permission
return Permission
Esempio n. 1
0
 public void GrantReadAndWriteToNone() =>
 Assert.Equal(Permission.Read | Permission.Write, Permissions.Grant(Permission.None, Permission.Read | Permission.Write));
Esempio n. 2
0
 public void GrantAllToNone() =>
 Assert.Equal(Permission.All, Permissions.Grant(Permission.None, Permission.All));
Esempio n. 3
0
 public void GrantDeleteToReadAndWrite() =>
 Assert.Equal(Permission.All, Permissions.Grant(Permission.Read | Permission.Write, Permission.Delete));
Esempio n. 4
0
 public void Grant_read_and_write_to_none()
 {
     Assert.Equal(Permission.Read | Permission.Write, Permissions.Grant(Permission.None, Permission.Read | Permission.Write));
 }
Esempio n. 5
0
 public void GrantReadToRead() =>
 Assert.Equal(Permission.Read, Permissions.Grant(Permission.Read, Permission.Read));
Esempio n. 6
0
 public void Grant_delete_to_read_and_write()
 {
     Assert.Equal(Permission.All, Permissions.Grant(Permission.Read | Permission.Write, Permission.Delete));
 }
Esempio n. 7
0
 public void Grant_all_to_none()
 {
     Assert.Equal(Permission.All, Permissions.Grant(Permission.None, Permission.All));
 }
Esempio n. 8
0
 public void Grant_read_to_read()
 {
     Assert.Equal(Permission.Read, Permissions.Grant(Permission.Read, Permission.Read));
 }
 public void Grant(Permission permission, Permission permissionToGrant, Permission expected) =>
 Assert.Equal(expected, Permissions.Grant(permission, permissionToGrant));
Esempio n. 10
0
 public void GrantReadToNone()
 {
     Assert.Equal(Permission.Read, Permissions.Grant(Permission.None, Permission.Read));
 }