Added hex converter unit tests

This commit is contained in:
Marcin Kostrzewski 2020-10-29 16:08:01 +01:00
parent 2f92de92fc
commit fee60b5d35

View File

@ -0,0 +1,15 @@
package Main;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class UtilsTest {
@Test
void stringToHexHexToStringTest(){
String text = "6f1a";
byte[] bytes = Utils.stringToBytes(text);
String result = Utils.bytesToHex(bytes);
assertEquals(text, result);
}
}