BAEL-281: Static Analysis tools with Eclipse (#2298)
This commit is contained in:
parent
7d36972570
commit
318d0790f5
17
static-analysis/src/test/java/com/baeldung/pmd/CntTest.java
Normal file
17
static-analysis/src/test/java/com/baeldung/pmd/CntTest.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package com.baeldung.pmd;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class CntTest {
|
||||||
|
|
||||||
|
private Cnt service;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void whenSecondParamIsZeroShouldReturnIntMax(){
|
||||||
|
service = new Cnt();
|
||||||
|
int answer = service.d(100,0);
|
||||||
|
assertEquals(Integer.MAX_VALUE, answer);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user