コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void createReadOnlyIndexReference() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void CreateReadOnlyIndexReference()
        {
            ReadOnlyIndexReferenceFactory indexReferenceFactory = ReadOnlyIndexReferenceFactory;
            IndexReference indexReference = indexReferenceFactory.CreateIndexReference(_indexIdentifier);

            _cleanupRule.add(indexReference);

            _expectedException.expect(typeof(System.NotSupportedException));
            indexReference.Writer;
        }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void refreshReadOnlyIndexReference() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void RefreshReadOnlyIndexReference()
        {
            ReadOnlyIndexReferenceFactory indexReferenceFactory = ReadOnlyIndexReferenceFactory;
            IndexReference indexReference = indexReferenceFactory.CreateIndexReference(_indexIdentifier);

            _cleanupRule.add(indexReference);

            IndexReference refreshedIndex = indexReferenceFactory.Refresh(indexReference);

            assertSame("Refreshed instance should be the same.", indexReference, refreshedIndex);
        }