Reader[] ICreateReaders.create(int n) { Reader[] r = new Reader[n]; for (int i = 0; i < n; i++) { r[i] = new LockReader(); } return(r); }
public void Read_Should_Work_When_One_Lock_Present() { FileSystem.AddFile($"{TestFileName}.{Guid.NewGuid()}.launchlock", "lock"); LockFinder.DoesLockExist(); LockReader.Read(); LockReader.LaunchLocks.Count().Should().Be(1); }
public void Read_Should_Work_When_Two_Locks_Present() { var fileName1 = $"{TestFileName}.{Guid.NewGuid()}.launchlock"; var fileName2 = $"{TestFileName}.{Guid.NewGuid()}.launchlock"; FileSystem.AddFile(fileName1, new Mocks().GetLaunchLockJson(fileName1)); FileSystem.AddFile(fileName2, new Mocks().GetLaunchLockJson(fileName2)); LockFinder.DoesLockExist(); LockReader.Read(); LockReader.LaunchLocks.Count().Should().Be(2); }
protected IEnumerable <Interface.ILaunchLock> GetCurrentLauchLocks() { LockFinder.DoesLockExist(); LockReader.Read(); return(LockReader.LaunchLocks); }