Пример #1
0
 public void HasPermission_PublicFile_NonOwnerCanRead()
 {
     File target = new File { UserName = "******", Public = true };
     bool expected = true;
     bool actual = target.HasPermission("nonOwner", Permissions.Read);
     Assert.AreEqual(expected, actual);
 }
Пример #2
0
 public void HasPermission_RequestingDeletePermission_NonOwnerCannotDelete()
 {
     File target = new File { UserName = "******", Public = true };
     bool expected = false;
     bool actual = target.HasPermission("nonOwner", Permissions.Delete);
     Assert.AreEqual(expected, actual);
 }
Пример #3
0
 public void HasPermission_RequestingUpdatePermission_OwnerCanUpdate()
 {
     File target = new File { UserName = "******", Public = true };
     bool expected = true;
     bool actual = target.HasPermission("joe", Permissions.Update);
     Assert.AreEqual(expected, actual);
 }