//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void allowMultipleCallstoActuallyStoreLocker() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void AllowMultipleCallstoActuallyStoreLocker() { StoreLayout storeLayout = TestDirectory.storeLayout(); using (GlobalStoreLocker storeLocker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { storeLocker.CheckLock(); storeLocker.CheckLock(); storeLocker.CheckLock(); storeLocker.CheckLock(); storeLocker.CheckLock(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void failToLockSameFolderAcrossIndependentLockers() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void FailToLockSameFolderAcrossIndependentLockers() { StoreLayout storeLayout = TestDirectory.storeLayout(); using (GlobalStoreLocker storeLocker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { storeLocker.CheckLock(); try { using (GlobalStoreLocker locker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { locker.CheckLock(); fail("directory should be locked"); } } catch (StoreLockException) { // expected } try { using (GlobalStoreLocker locker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { locker.CheckLock(); fail("directory should be locked"); } } catch (StoreLockException) { // expected } } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void allowToLockSameDirectoryIfItWasUnlocked() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void AllowToLockSameDirectoryIfItWasUnlocked() { StoreLayout storeLayout = TestDirectory.storeLayout(); using (GlobalStoreLocker storeLocker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { storeLocker.CheckLock(); } using (GlobalStoreLocker storeLocker = new GlobalStoreLocker(FileSystemRule.get(), storeLayout)) { storeLocker.CheckLock(); } }