Unlock() публичный Метод

public Unlock ( VersionStatus versionStatus, VersionRaising versionRaising ) : void
versionStatus VersionStatus
versionRaising VersionRaising
Результат void
Пример #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));
		}
Пример #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
			);
		}