//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldRemoveAndAddEntries() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldRemoveAndAddEntries() { // given PartitionedIndexStorage indexStorage = IndexStorage; LuceneIndexAccessor accessor = CreateAccessor(indexStorage); // when UpdateAndCommit(accessor, asList(Add(1L, "value1"))); UpdateAndCommit(accessor, asList(Add(2L, "value2"))); UpdateAndCommit(accessor, asList(Add(3L, "value3"))); UpdateAndCommit(accessor, asList(Add(4L, "value4"))); UpdateAndCommit(accessor, asList(Remove(1L, "value1"))); UpdateAndCommit(accessor, asList(Remove(2L, "value2"))); UpdateAndCommit(accessor, asList(Remove(3L, "value3"))); UpdateAndCommit(accessor, asList(Add(1L, "value1"))); UpdateAndCommit(accessor, asList(Add(3L, "value3b"))); accessor.Dispose(); // then assertEquals(asList(1L), GetAllNodes(indexStorage, "value1")); assertEquals(emptyList(), GetAllNodes(indexStorage, "value2")); assertEquals(emptyList(), GetAllNodes(indexStorage, "value3")); assertEquals(asList(3L), GetAllNodes(indexStorage, "value3b")); assertEquals(asList(4L), GetAllNodes(indexStorage, "value4")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldUpdateUniqueEntries() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldUpdateUniqueEntries() { // given PartitionedIndexStorage indexStorage = IndexStorage; LuceneIndexAccessor accessor = CreateAccessor(indexStorage); // when UpdateAndCommit(accessor, asList(Add(1L, "value1"))); UpdateAndCommit(accessor, asList(Change(1L, "value1", "value2"))); accessor.Dispose(); // then assertEquals(asList(1L), GetAllNodes(indexStorage, "value2")); assertEquals(emptyList(), GetAllNodes(indexStorage, "value1")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldConsiderWholeTransactionForValidatingUniqueness() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldConsiderWholeTransactionForValidatingUniqueness() { // given PartitionedIndexStorage indexStorage = IndexStorage; LuceneIndexAccessor accessor = CreateAccessor(indexStorage); // when UpdateAndCommit(accessor, asList(Add(1L, "value1"))); UpdateAndCommit(accessor, asList(Add(2L, "value2"))); UpdateAndCommit(accessor, asList(Change(1L, "value1", "value2"), Change(2L, "value2", "value1"))); accessor.Dispose(); // then assertEquals(asList(2L), GetAllNodes(indexStorage, "value1")); assertEquals(asList(1L), GetAllNodes(indexStorage, "value2")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @After public void after() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void After() { _accessor.Dispose(); _dirFactory.close(); }