Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

JuliaRecalde
Copy link

No description provided.

@@ -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) {

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.

Copy link
Author

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;

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entonces la quito nomas?

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");

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.

Copy link
Author

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.

modify test ValidInput

delete isHexadecimal

modify test validinput

modify test

modify test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants