Unlock() public method

public Unlock ( VersionStatus versionStatus, VersionRaising versionRaising ) : void
versionStatus VersionStatus
versionRaising VersionRaising
return void
Ejemplo n.º 1
0
		public void LockHandler_Unlock_Test()
		{
			Node node = CreateTestPage();

			LockHandler target = new LockHandler(node);
			if (!target.Locked)
			{
				target.Lock();
			}
			target.Unlock(VersionStatus.Approved, VersionRaising.None);

			Assert.IsTrue(!GetNodeInfo_Locked(node));
		}
Ejemplo n.º 2
0
		public void LockHandler_Lock_Test()
		{
			Node node = CreateTestPage();

			LockHandler target = new LockHandler(node);

			if (target.Locked)
			{
				target.Unlock(VersionStatus.Approved, VersionRaising.None);
			}
			target.Lock();

			Assert.IsTrue(
				!(string.IsNullOrEmpty(GetNodeInfo_LockToken(node))) &&
				GetNodeInfo_LockedById(node) == User.Current.Id &&
				GetNodeInfo_LockDate(node) != DateTime.MinValue &&
				GetNodeInfo_LastLockUpdate(node) != DateTime.MinValue &&
				GetNodeInfo_LockTimeout(node) > 0
			);
		}