-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestControladorLCD.java
More file actions
65 lines (56 loc) · 2.01 KB
/
testControladorLCD.java
File metadata and controls
65 lines (56 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import controlador.*;
import static org.testng.Assert.*;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
*
* @author User
*/
public class testControladorLCD {
public testControladorLCD() {
}
@Test
public void testvalidaEspacioEntreDigitos() {
int resultadoActual=ControladorLCD.validaEspacioEntreDigitos("3");
int resultadoEsperado=3;
assertEquals(resultadoActual, resultadoEsperado, "Error test validar Espacio entre digitos");
}
public void testvalidaSize() {
ControladorLCD controladorLCD= new ControladorLCD();
int resultadoActual=controladorLCD.validaSize("9");
int resultadoEsperado=9;
assertEquals(resultadoActual, resultadoEsperado, "Error test validar size");
}
public void testisNumerictrue() {
ControladorLCD controladorLCD= new ControladorLCD();
boolean resultadoActual=controladorLCD.isNumeric("99");
boolean resultadoEsperado=true;
assertEquals(resultadoActual, resultadoEsperado, "Error test validar isNumeric");
}
public void testisNumericfalse() {
ControladorLCD controladorLCD= new ControladorLCD();
boolean resultadoActual=controladorLCD.isNumeric("9q");
boolean resultadoEsperado=false;
assertEquals(resultadoActual, resultadoEsperado, "Error test validar isNumeric");
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@BeforeMethod
public void setUpMethod() throws Exception {
}
@AfterMethod
public void tearDownMethod() throws Exception {
}
}