public void InclusiveTermShouldBeFormattedCorrecly() { var token = new RiakSearchToken(); var srt = new RiakSearchRangeToken {From = "20020101", To = "20030101", Inclusive = true}; token.Field = "mod_date"; token.Term = srt; token.Term.ToSearchTerm().ShouldEqual("[20020101 TO 20030101]"); token.ToString().ShouldEqual("mod_date:[20020101 TO 20030101]"); }
public void ExclusiveTermShouldBeFormattedCorrecly() { var token = new RiakSearchToken {Field = "title"}; var srt = new RiakSearchRangeToken {From = "Aida", To = "Carmen", Inclusive = false}; token.Term = srt; token.Term.ToSearchTerm().ShouldEqual("{Aida TO Carmen}"); token.ToString().ShouldEqual("title:{Aida TO Carmen}"); }