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); }
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); }
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); }