public void Test_ParsedRequest_Parsing_Building_Match(string value, string regexKey, string expectedMatch, int expectedMatchCount) { ParsedRequest requestObject = ParsedRequest.GetParsedRequest(value); Assert.AreEqual(value.ToLower(), requestObject.ToString().ToLower()); AssertMatches(requestObject, regexKey, expectedMatch, expectedMatchCount); }
public void Test_ParsedRequest_Delete(string value, string regexKey, string expectedMatch, int expectedMatchCount) { ParsedRequest requestObject = ParsedRequest.GetParsedRequest(value); requestObject.Delete(regexKey); AssertMatches(requestObject, regexKey, expectedMatch, 0); }
public void Test_UpdateMatchingEntryId(string value, string regexKey, string expectedMatch, int expectedMatchCount) { if (expectedMatchCount != 1 || !regexKey.Equals(Constants.REGEX_WAS_ENTRY_IES)) { return; } expectedMatch = "-88888"; ParsedRequest requestObject = ParsedRequest.GetParsedRequest(value); List <KeyValuePair <string, object> > matches = requestObject.GetMatches(regexKey); foreach (KeyValuePair <string, object> match in matches) { requestObject.Update(match, expectedMatch, requestObject.Dictionary); } AssertMatches(requestObject, regexKey, expectedMatch, expectedMatchCount); }
public void Test_ParsedRequest_AddOrUpdate(string value, string regexKey, string expectedMatch, int expectedMatchCount) { ParsedRequest requestObject = ParsedRequest.GetParsedRequest(value); AssertParsedRequest_AddOrUpdate(requestObject, regexKey, expectedMatch, expectedMatchCount); }