示例#1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldTellNodeInUse() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldTellNodeInUse()
        {
            // Given
            EphemeralFileSystemAbstraction fs = _efs.get();
            NodeStore store = NewNodeStore(fs);

            long exists = store.NextId();

            store.UpdateRecord(new NodeRecord(exists, false, 10, 20, true));

            long deleted = store.NextId();

            store.UpdateRecord(new NodeRecord(deleted, false, 10, 20, true));
            store.UpdateRecord(new NodeRecord(deleted, false, 10, 20, false));

            // When & then
            assertTrue(store.IsInUse(exists));
            assertFalse(store.IsInUse(deleted));
            assertFalse(store.IsInUse(_nodeStore.recordFormat.MaxId));
        }