public void LockUnlockTest() { UnsafeLock _lock = new UnsafeLock(); _lock.Lock(); _lock.Unlock(); }
public void Add() { _lock.Lock(); Num++; _lock.Unlock(); }
public void UnlockNoLockTest() { UnsafeLock _lock = new UnsafeLock(); Assert.Catch <UnsafeLockException>(() => { _lock.Unlock(); }); }