import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class TextAnalysisTest {
@Test
public void testNumberRange(){
//if i put a number between 1-4 here - Junit will pass the test
//if not - Junit will fail
int [] input = {1, 2, 3, 4};
int min = 1;
int max = 4;
assertEquals(input).isGreaterThanOrEqualTo(min).isLessThanOrEqualTo(max);
System.out.println("test finished");
}
}
I'm a novice to Java and really trying to learn. Could anybody help me with this solution? thanks.
Aucun commentaire:
Enregistrer un commentaire