-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add test hex2byte and methods #5
base: master
Are you sure you want to change the base?
Conversation
modify method hex2byte
… into jrecalde-advance
@@ -177,7 +181,19 @@ public static String trim (String s) { | |||
public static String zeropad(String s, int len) throws ISOException { | |||
return padleft(s, len, '0'); | |||
} | |||
|
|||
|
|||
public static boolean isHexadecimal(byte[] bytes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esta función entiendo que no se usa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no no la uso, se me paso quitarla, ahora lo quito.
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.fest.assertions.Assert; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
este import no es necesario y tampoco eliminar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entonces la quito nomas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no modifiques las lineas que no necesitas. Es buena practicar modificar el mínimo posible.
public void testHex2byte_InvalidInput_ThrowsExceptionWithMessage() { | ||
|
||
Exception exception = assertThrows(IllegalArgumentException.class, () -> { | ||
ISOUtil.hex2byte("1111"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Este es un input válido, pero el objetivo es que pruebes con un input inválido.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si lo he probado de ambas formas Dani.
eaa4e6b
to
95a23dc
Compare
modify test ValidInput delete isHexadecimal modify test validinput modify test modify test
No description provided.