public void ShouldNotMatchSize() { var doc = new CloudSearchDocument(); var doc2 = new CloudSearchDocument { Id = "some different id" }; doc.GetSize().ShouldNotEqual(doc2.GetSize()); }
public void ShouldMatchSizes() { var doc = new CloudSearchDocument { Id = "some id" }; var doc2 = new CloudSearchDocument { Id = "some id" }; doc.GetSize().ShouldEqual(doc2.GetSize()); }
private Dictionary <string, object> CreateDocumentDictionary(CloudSearchDocument document) { var dictionary = document.Fields .Select(kvp => new KeyValuePair <string, object>(kvp.Key, SimplifyFieldValue(kvp.Value))) .Where(kvp => HasValidValue(kvp.Value)) .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); dictionary.Add("@search.action", FormatSearchAction(document.Action)); return(dictionary); }
public void AddDocument(CloudSearchDocument document) { documents.Add(document); }