public void ParseSIPRouteSetTest()
{
Console.WriteLine("--> " + System.Reflection.MethodBase.GetCurrentMethod().Name);
string routeSetString = "<sip:127.0.0.1:5434;lr>,<sip:10.0.0.1>,<sip:192.168.0.1;ftag=12345;lr=on>";
SIPRouteSet routeSet = ParseSIPRouteSet(routeSetString);
Console.WriteLine(routeSet.ToString());
Assert.IsTrue(routeSet.Length == 3, "The parsed route set had an incorrect length.");
Assert.IsTrue(routeSet.ToString() == routeSetString, "The parsed route set did not produce the same string as the original parsed value.");
SIPRoute topRoute = routeSet.PopRoute();
Assert.IsTrue(topRoute.Host == "127.0.0.1:5434", "The first route host was not parsed correctly.");
Assert.IsFalse(topRoute.IsStrictRouter, "The first route host was not correctly recognised as a loose router.");
topRoute = routeSet.PopRoute();
Assert.IsTrue(topRoute.Host == "10.0.0.1", "The second route host was not parsed correctly.");
Assert.IsTrue(topRoute.IsStrictRouter, "The second route host was not correctly recognised as a strict router.");
topRoute = routeSet.PopRoute();
Assert.IsTrue(topRoute.Host == "192.168.0.1", "The third route host was not parsed correctly.");
Assert.IsFalse(topRoute.IsStrictRouter, "The third route host was not correctly recognised as a loose router.");
Assert.IsTrue(topRoute.URI.Parameters.Get("ftag") == "12345", "The ftag parameter on the third route was not correctly parsed.");
}