public void RouteParamExtractTest() { Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name); string routeParam = ";lr;server=hippo"; SIPParameters serverParam = new SIPParameters(routeParam, ';'); string serverParamValue = serverParam.Get("server"); Console.WriteLine("Parameter string=" + serverParam.ToString() + "."); Console.WriteLine("The server parameter is=" + serverParamValue + "."); Assert.IsTrue(serverParamValue == "hippo", "The server parameter was not correctly extracted."); }
public void QuotedStringParamExtractTest() { Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name); string methodsParam = ";methods=\"INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER\""; SIPParameters serverParam = new SIPParameters(methodsParam, ';'); string methodsParamValue = serverParam.Get("methods"); Console.WriteLine("Parameter string=" + serverParam.ToString() + "."); Console.WriteLine("The methods parameter is=" + methodsParamValue + "."); Assert.IsTrue(methodsParamValue == "\"INVITE, MESSAGE, INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER\"", "The method parameter was not correctly extracted."); }