//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void mustSelectStringForStringSuffixPredicate() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void MustSelectStringForStringSuffixPredicate() { // given IndexQuery.StringSuffixPredicate stringPrefix = IndexQuery.stringSuffix(PROP_KEY, stringValue("abc")); // then VerifyQueryWithCorrectReader(ExpectedForStrings(), stringPrefix); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldComputeIndexUpdatesForRangeSeekBySuffixWhenThereArePartiallyMatchingNewNodes() internal virtual void ShouldComputeIndexUpdatesForRangeSeekBySuffixWhenThereArePartiallyMatchingNewNodes() { // GIVEN ReadableTransactionState state = (new TxStateBuilder()).WithAdded(40L, "Aaron").withAdded(41L, "Agatha").withAdded(42L, "Andreas").withAdded(43L, "Andrea").withAdded(44L, "Aristotle").withAdded(45L, "Barbara").withAdded(46L, "Barbarella").withAdded(47L, "Cinderella").build(); // WHEN IndexQuery.StringSuffixPredicate indexQuery = IndexQuery.stringSuffix(outerInstance.index.Schema().PropertyId, stringValue("ella")); AddedAndRemoved changes = indexUpdatesForSuffixOrContains(state, outerInstance.index, indexQuery, IndexOrder.NONE); AddedWithValuesAndRemoved changesWithValues = indexUpdatesWithValuesForSuffixOrContains(state, outerInstance.index, indexQuery, IndexOrder.NONE); // THEN outerInstance.AssertContains(changes.Added, 46L, 47L); outerInstance.AssertContains(changesWithValues.Added, NodeWithPropertyValues(46L, "Barbarella"), NodeWithPropertyValues(47L, "Cinderella")); }
internal virtual void AssertRangeSeekBySuffixForOrder(IndexOrder indexOrder) { // GIVEN ReadableTransactionState state = (new TxStateBuilder()).WithAdded(40L, "Aaron").withAdded(41L, "Bonbon").withAdded(42L, "Crayfish").withAdded(43L, "Mayonnaise").withAdded(44L, "Seashell").withAdded(45L, "Ton").withAdded(46L, "Macron").withAdded(47L, "Tony").withAdded(48L, "Evon").withAdded(49L, "Andromeda").build(); // WHEN IndexQuery indexQuery = IndexQuery.stringSuffix(outerInstance.index.Schema().PropertyId, stringValue("on")); AddedAndRemoved changes = indexUpdatesForSuffixOrContains(state, outerInstance.index, indexQuery, indexOrder); AddedWithValuesAndRemoved changesWithValues = indexUpdatesWithValuesForSuffixOrContains(state, outerInstance.index, indexQuery, indexOrder); NodeWithPropertyValues[] expected = new NodeWithPropertyValues[] { NodeWithPropertyValues(40L, "Aaron"), NodeWithPropertyValues(41L, "Bonbon"), NodeWithPropertyValues(48L, "Evon"), NodeWithPropertyValues(46L, "Macron"), NodeWithPropertyValues(45L, "Ton") }; // THEN outerInstance.AssertContains(indexOrder, changes, changesWithValues, expected); }