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