public void Setup() { _lockManager = new MutextLockManager(Moq.Mock.Of <ILogger>()); _lockKey = Guid.NewGuid().ToString(); _dummyGetOutput = "GetOutput"; _get = () => { return(_dummyGetOutput); }; _actualOutput = null; }
public void Given_Lock_Is_Already_Held_By_Other_Process() { _lockManager = new MutextLockManager(Moq.Mock.Of <ILogger>()); var t = new Thread(new ThreadStart(() => { _otherMutex = new Mutex(false, "Global\\" + _lockKey); _otherMutex.WaitOne(); Thread.Sleep(3000); _otherMutex.ReleaseMutex(); })); t.Start(); }
public void Setup() { _lockManager = new MutextLockManager(Moq.Mock.Of <ILogger>()); _lockKey = Guid.NewGuid().ToString(); }