internal static void AssertCompareTo(string string1, string string2) { TextValue textValue1 = stringValue(string1); TextValue textValue2 = stringValue(string2); TextValue utf8Value1 = utf8Value(string1.GetBytes(UTF_8)); TextValue utf8Value2 = utf8Value(string2.GetBytes(UTF_8)); int a = textValue1.CompareTo(textValue2); int x = textValue1.CompareTo(utf8Value2); int y = utf8Value1.CompareTo(textValue2); int z = utf8Value1.CompareTo(utf8Value2); assertThat(Math.Sign(a), equalTo(Math.Sign(x))); assertThat(Math.Sign(a), equalTo(Math.Sign(y))); assertThat(Math.Sign(a), equalTo(Math.Sign(z))); }