Added hex converter unit tests
This commit is contained in:
parent
2f92de92fc
commit
fee60b5d35
15
src/test/java/Main/UtilsTest.java
Normal file
15
src/test/java/Main/UtilsTest.java
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user