public void Test_searchCriteriaQuerySeverity() { SearchManagementController searchCon = new SearchManagementController(); SearchCriteria s = new SearchCriteria { anyKeywordString = null, allKeywordString = null, noneKeywordString = null, patientFirstName = null, patientLastName = null, questionType = null, requestorFirstName = null, requestorLastName = "100", requestStatus = null, tumorGroup = null, severity = "Moderate", consequence = null, }; List<Request> results = searchCon.searchCriteriaQuery(s); // Assert.AreEqual(results.Count, 1); Assert.AreEqual(results[0].PatientFName, "TSMC Test2"); Assert.AreEqual(results[0].RequestorFName, "20"); Assert.AreEqual(results[0].RequestorLName, "100"); Assert.AreEqual(results[0].QuestionResponses[0].Severity, 1); }
public void Test_searchCriteriaQueryCombineKeywords() { SearchManagementController searchCon = new SearchManagementController(); SearchCriteria s = new SearchCriteria { anyKeywordString = null, allKeywordString = _randomKeyword.KeywordValue + "," + _randomKeyword2.KeywordValue, noneKeywordString = _randomKeyword4.KeywordValue, patientFirstName = null, patientLastName = null, questionType = null, requestorFirstName = null, requestorLastName = null, requestStatus = null, tumorGroup = null, severity = null, consequence = null, }; List<Request> results = searchCon.searchCriteriaQuery(s); Assert.AreEqual(results.Count, 1); Assert.AreEqual(results[0].PatientFName, "TSMC Test"); Assert.AreEqual(results[0].RequestorFName, "10"); Assert.AreEqual(results[0].RequestorLName, "100"); }