Created
July 9, 2014 16:58
-
-
Save thiagomarinho/e03b52897abab3521b62 to your computer and use it in GitHub Desktop.
Exemplo de teste usando parâmetros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.thiagomarinho.testes; | |
@RunWith(Parameterized.class) | |
public class TesteParameterized { | |
private int id; | |
// O exemplo desse método tá bem pobre. Acho que posso melhorá-lo depois. | |
@Parameters(name = "registro #{0}") | |
public static List<Integer[]> data() throws Exception { | |
Integer[][] ids = new Integer[10][]; | |
for (int x = 0; x < linhas.length; x++) { | |
Integer[] parametros = { linhas[x] }; | |
ids[x] = parametros; | |
} | |
return Arrays.asList(ids); | |
} | |
public TesteParameterized(int id) { | |
this.id = id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment