public void CompositeStringYieldsOneResult() { this.sut.ParseQueryTokens("\"Jack be quick\"").Should().BeEquivalentTo( QueryToken.ForOperator(QueryTokenType.BeginAdjacentTextOperator), QueryToken.ForText("Jack"), QueryToken.ForText("be"), QueryToken.ForText("quick"), QueryToken.ForOperator(QueryTokenType.EndAdjacentTextOperator)); }
public void TwoCompositeStringsYieldsSixResults() { this.sut.ParseQueryTokens(@"""First string"" ""Second string""").Should().BeEquivalentTo( QueryToken.ForOperator(QueryTokenType.BeginAdjacentTextOperator), QueryToken.ForText("First"), QueryToken.ForText("string"), QueryToken.ForOperator(QueryTokenType.EndAdjacentTextOperator), QueryToken.ForOperator(QueryTokenType.BeginAdjacentTextOperator), QueryToken.ForText("Second"), QueryToken.ForText("string"), QueryToken.ForOperator(QueryTokenType.EndAdjacentTextOperator)); }
public void SingleWordWithSpacePaddingYieldsOneResult() { this.sut.ParseQueryTokens(" \t Testing \t ").Should().BeEquivalentTo( QueryToken.ForText("Testing")); }