public void Msmq_SendLargeIndexDocument() { using (var loggedDataProvider = new LoggedDataProvider()) { _indexDocumentContained = null; // create a single lucene message with LARGE indexdocument var sendmsg = CreateLucActivity(TestRoot.VersionId, true); // send it, receive it, process it TestIndexDocumentSending(sendmsg); Assert.IsTrue(_indexDocumentContained.Value == false, "Lucene activity contains index document, even though it should not."); // check that retrieving index document from db occurred only once var log = loggedDataProvider._GetLogAndClear(); //LoadIndexDocumentByVersionId(versionId=<163>); Assert.IsTrue(log.Split(new string[] { "LoadIndexDocumentByVersionId" }, StringSplitOptions.RemoveEmptyEntries).Length == 2, "Call to LoadIndexDocumentByVersionId happened more than once"); //GetIndexDocumentDataFromReader(reader=<System.Data.SqlClient.SqlDataReader>); Assert.IsTrue(log.Split(new string[] { "GetIndexDocumentDataFromReader" }, StringSplitOptions.RemoveEmptyEntries).Length == 2, "Call to GetIndexDocumentDataFromReader happened more than once"); } }
public void Msmq_SendSmallIndexDocument() { using (var loggedDataProvider = new LoggedDataProvider()) { _indexDocumentContained = null; // create a single lucene message with SMALL indexdocument var sendmsg = CreateLucActivity(TestRoot.VersionId, false); // send it, receive it, process it TestIndexDocumentSending(sendmsg); Assert.IsTrue(_indexDocumentContained.Value == true, "Lucene activity does not contain index document, even though it should."); // check that retrieving index document from db never occurred var log = loggedDataProvider._GetLogAndClear(); //LoadIndexDocumentByVersionId(versionId=<163>); Assert.IsFalse(log.Contains("LoadIndexDocumentByVersionId"), "Call to LoadIndexDocumentByVersionId happened, although it should not have."); //GetIndexDocumentDataFromReader(reader=<System.Data.SqlClient.SqlDataReader>); Assert.IsFalse(log.Contains("GetIndexDocumentDataFromReader"), "Call to GetIndexDocumentDataFromReader happened, although it should not have."); } }