Ejemplo n.º 1
0
            public void GetHashCodeDiffOrderEqualityUnittest()
            {
                Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);

                string        testParamStr1 = ";lr;server=hippo;ftag=12345";
                SIPParameters testParam1    = new SIPParameters(testParamStr1, ';');

                string        testParamStr2 = "ftag=12345;lr;server=hippo;";
                SIPParameters testParam2    = new SIPParameters(testParamStr2, ';');

                Assert.IsTrue(testParam1.GetHashCode() == testParam2.GetHashCode(), "The parameters had different hashcode values.");
            }
Ejemplo n.º 2
0
            public void GetHashCodeDiffValueCaseEqualityUnittest()
            {
                Console.WriteLine(System.Reflection.MethodBase.GetCurrentMethod().Name);

                string        testParamStr1 = ";LR;Server=hippo;FTag=12345";
                SIPParameters testParam1    = new SIPParameters(testParamStr1, ';');

                Console.WriteLine("Parameter 1:" + testParam1.ToString());

                string        testParamStr2 = "ftag=12345;lr;server=HiPPo;";
                SIPParameters testParam2    = new SIPParameters(testParamStr2, ';');

                Console.WriteLine("Parameter 2:" + testParam2.ToString());

                Assert.IsTrue(testParam1.GetHashCode() != testParam2.GetHashCode(), "The parameters had different hashcode values.");
            }