void CreateFunctions() { connection.CreateFunction( "JSON", 2, new Function((arguments) => JsonCollator.Compare( JsonCollationMode.Unicode, (string)arguments [0], (string)arguments [1], Int32.MaxValue)), true); connection.CreateFunction( "JSON_ASCII", 2, new Function((arguments) => JsonCollator.Compare( JsonCollationMode.Ascii, (string)arguments [0], (string)arguments [1], Int32.MaxValue)), true); connection.CreateFunction( "JSON_RAW", 2, new Function((arguments) => JsonCollator.Compare( JsonCollationMode.Raw, (string)arguments [0], (string)arguments [1], Int32.MaxValue)), true); }
private static void TestCollateEquals(JsonCollationMode mode, String input1, String input2, int arrayLimit, int expectedValue) { int result = JsonCollator.Compare(mode, input1, input2, arrayLimit); Assert.AreEqual(expectedValue, result); }