Пример #1
0
 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));
 }
Пример #2
0
 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));
 }
Пример #3
0
 public void SingleWordWithSpacePaddingYieldsOneResult()
 {
     this.sut.ParseQueryTokens("  \t  Testing   \t ").Should().BeEquivalentTo(
         QueryToken.ForWord("Testing"));
 }
Пример #4
0
 public void SingleWordYieldsOneResult()
 {
     this.sut.ParseQueryTokens("Testing").Should().BeEquivalentTo(
         QueryToken.ForWord("Testing"));
 }