//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void addedNodeCompositePropertiesIncludedInSample() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void AddedNodeCompositePropertiesIncludedInSample() { NonUniqueIndexSampler sampler = NewSampler(); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(sampler); updater.Process(add(1, _compositeSchemaDescriptor, "bit", "foo")); updater.Process(add(2, _compositeSchemaDescriptor, "bit", "bar")); updater.Process(add(3, _compositeSchemaDescriptor, "bit", "baz")); updater.Process(add(4, _compositeSchemaDescriptor, "bit", "bar")); VerifySamplingResult(sampler, 4, 3, 4); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void changedNodePropertiesIncludedInSample() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ChangedNodePropertiesIncludedInSample() { NonUniqueIndexSampler sampler = NewSampler(); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(sampler); updater.Process(add(1, _schemaDescriptor, "initial1")); updater.Process(add(2, _schemaDescriptor, "initial2")); updater.Process(add(3, _schemaDescriptor, "new2")); updater.Process(change(1, _schemaDescriptor, "initial1", "new1")); updater.Process(change(1, _schemaDescriptor, "initial2", "new2")); VerifySamplingResult(sampler, 3, 2, 3); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void removedNodePropertyIncludedInSample() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void RemovedNodePropertyIncludedInSample() { NonUniqueIndexSampler sampler = NewSampler(); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(sampler); updater.Process(add(1, _schemaDescriptor, "foo")); updater.Process(add(2, _schemaDescriptor, "bar")); updater.Process(add(3, _schemaDescriptor, "baz")); updater.Process(add(4, _schemaDescriptor, "qux")); updater.Process(remove(1, _schemaDescriptor, "foo")); updater.Process(remove(2, _schemaDescriptor, "bar")); updater.Process(remove(4, _schemaDescriptor, "qux")); VerifySamplingResult(sampler, 1, 1, 1); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void removalsDeliveredToIndexWriter() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void RemovalsDeliveredToIndexWriter() { LuceneIndexWriter writer = mock(typeof(LuceneIndexWriter)); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(writer); updater.Process(remove(1, _schemaDescriptor, "foo")); verify(writer).deleteDocuments(newTermForChangeOrRemove(1)); updater.Process(remove(2, _schemaDescriptor, "bar")); verify(writer).deleteDocuments(newTermForChangeOrRemove(2)); updater.Process(remove(3, _schemaDescriptor, "baz")); verify(writer).deleteDocuments(newTermForChangeOrRemove(3)); updater.Process(remove(4, _compositeSchemaDescriptor, "bit", "baz")); verify(writer).deleteDocuments(newTermForChangeOrRemove(4)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void changesDeliveredToIndexWriter() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ChangesDeliveredToIndexWriter() { LuceneIndexWriter writer = mock(typeof(LuceneIndexWriter)); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(writer); string expectedString1 = documentRepresentingProperties(1, "after1").ToString(); string expectedString2 = documentRepresentingProperties(2, "after2").ToString(); string expectedString3 = documentRepresentingProperties(3, "bit", "after2").ToString(); updater.Process(change(1, _schemaDescriptor, "before1", "after1")); Verifydocument(writer, newTermForChangeOrRemove(1), expectedString1); updater.Process(change(2, _schemaDescriptor, "before2", "after2")); Verifydocument(writer, newTermForChangeOrRemove(2), expectedString2); updater.Process(change(3, _compositeSchemaDescriptor, new object[] { "bit", "before2" }, new object[] { "bit", "after2" })); Verifydocument(writer, newTermForChangeOrRemove(3), expectedString3); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void nodeCompositePropertyUpdatesIncludedInSample() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void NodeCompositePropertyUpdatesIncludedInSample() { NonUniqueIndexSampler sampler = NewSampler(); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(sampler); updater.Process(add(1, _compositeSchemaDescriptor, "bit", "foo")); updater.Process(change(1, _compositeSchemaDescriptor, new object[] { "bit", "foo" }, new object[] { "bit", "newFoo1" })); updater.Process(add(2, _compositeSchemaDescriptor, "bit", "bar")); updater.Process(remove(2, _compositeSchemaDescriptor, "bit", "bar")); updater.Process(change(1, _compositeSchemaDescriptor, new object[] { "bit", "newFoo1" }, new object[] { "bit", "newFoo2" })); updater.Process(add(42, _compositeSchemaDescriptor, "bit", "qux")); updater.Process(add(3, _compositeSchemaDescriptor, "bit", "bar")); updater.Process(add(4, _compositeSchemaDescriptor, "bit", "baz")); updater.Process(add(5, _compositeSchemaDescriptor, "bit", "bar")); updater.Process(remove(42, _compositeSchemaDescriptor, "bit", "qux")); VerifySamplingResult(sampler, 4, 3, 4); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void additionsDeliveredToIndexWriter() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void AdditionsDeliveredToIndexWriter() { LuceneIndexWriter writer = mock(typeof(LuceneIndexWriter)); NonUniqueLuceneIndexPopulatingUpdater updater = NewUpdater(writer); string expectedString1 = documentRepresentingProperties(1, "foo").ToString(); string expectedString2 = documentRepresentingProperties(2, "bar").ToString(); string expectedString3 = documentRepresentingProperties(3, "qux").ToString(); string expectedString4 = documentRepresentingProperties(4, "git", "bit").ToString(); updater.Process(add(1, _schemaDescriptor, "foo")); Verifydocument(writer, newTermForChangeOrRemove(1), expectedString1); updater.Process(add(2, _schemaDescriptor, "bar")); Verifydocument(writer, newTermForChangeOrRemove(2), expectedString2); updater.Process(add(3, _schemaDescriptor, "qux")); Verifydocument(writer, newTermForChangeOrRemove(3), expectedString3); updater.Process(add(4, _compositeSchemaDescriptor, "git", "bit")); Verifydocument(writer, newTermForChangeOrRemove(4), expectedString4); }