Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldDecodeEmptyStringToEmptyBytes()
        internal virtual void ShouldDecodeEmptyStringToEmptyBytes()
        {
            sbyte[] result = HexString.DecodeHexString("");
            assertArrayEquals(new sbyte[] {}, result);
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldEncodeEmptyBytesToEmptyString()
        internal virtual void ShouldEncodeEmptyBytesToEmptyString()
        {
            string result = HexString.EncodeHexString(new sbyte[] {});

            assertEquals("", result);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldDecodeStringToBytes()
        internal virtual void ShouldDecodeStringToBytes()
        {
            sbyte[] result   = HexString.DecodeHexString("00f34CEFFF3e02");
            sbyte[] expected = new sbyte[] { ( sbyte )0x00, unchecked (( sbyte )0xF3), ( sbyte )0x4C, unchecked (( sbyte )0xEF), unchecked (( sbyte )0xFF), ( sbyte )0x3E, ( sbyte )0x02 };
            assertArrayEquals(expected, result);
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldEncodeBytesToString()
        internal virtual void ShouldEncodeBytesToString()
        {
            string result = HexString.EncodeHexString(new sbyte[] { unchecked (( sbyte )0xFF), unchecked (( sbyte )0x94), ( sbyte )0x5C, ( sbyte )0x00, ( sbyte )0x3D });

            assertEquals("FF945C003D", result);
        }