예제 #1
0
        private static void AssertNotEqual(QueryString queryString1, QueryString queryString2)
        {
            Assert.IsFalse(queryString1.Equals(queryString2), "First: " + queryString1 + "\nSecond: " + queryString2);

            Assert.IsFalse(queryString1.Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing actual, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(queryString2), "After serializing and parsing expected, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing both, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
        }
예제 #2
0
        private static void AssertEqual(QueryString expected, QueryString actual)
        {
            Assert.IsTrue(expected.Equals(actual), "Expected: " + expected + "\nActual: " + actual);

            Assert.IsTrue(expected.Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing actual, result changed.\n\nExpected: " + expected + "\nActual: " + QueryString.Parse(actual.ToString()));
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(actual), "After serializing and parsing expected, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + actual);
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing both, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + QueryString.Parse(actual.ToString()));
        }
예제 #3
0
        private static void AssertParse(QueryString expected, string inputQueryString)
        {
            Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString)), "Expected: " + expected + "\nActual: " + inputQueryString);

            if (inputQueryString != null)
            {
                Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString.Replace('&', ';'))), "Expected: " + expected + "\nActual: " + inputQueryString);
            }
        }
        private static void AssertNotEqual(QueryString queryString1, QueryString queryString2)
        {
            Assert.IsFalse(queryString1.Equals(queryString2), "First: " + queryString1 + "\nSecond: " + queryString2);

            Assert.IsFalse(queryString1.Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing actual, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(queryString2), "After serializing and parsing expected, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing both, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
        }
        private static void AssertEqual(QueryString expected, QueryString actual)
        {
            Assert.IsTrue(expected.Equals(actual), "Expected: " + expected + "\nActual: " + actual);

            Assert.IsTrue(expected.Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing actual, result changed.\n\nExpected: " + expected + "\nActual: " + QueryString.Parse(actual.ToString()));
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(actual), "After serializing and parsing expected, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + actual);
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing both, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + QueryString.Parse(actual.ToString()));
        }
        private static void AssertParse(QueryString expected, string inputQueryString)
        {
            Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString)), "Expected: " + expected + "\nActual: " + inputQueryString);

            if (inputQueryString != null)
                Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString.Replace('&', ';'))), "Expected: " + expected + "\nActual: " + inputQueryString);
        }