removed unnecessary Mockito and refactored test method name
This commit is contained in:
parent
0f18f2844d
commit
2784b3de4c
|
@ -7,14 +7,12 @@ import org.mockito.runners.MockitoJUnitRunner;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
@RunWith(MockitoJUnitRunner.class)
|
|
||||||
public class NthRootCalculatorUnitTest {
|
public class NthRootCalculatorUnitTest {
|
||||||
|
|
||||||
@InjectMocks
|
private NthRootCalculator nthRootCalculator = new NthRootCalculator();
|
||||||
private NthRootCalculator nthRootCalculator;
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void giventThatTheBaseIs125_andTheExpIs3_whenCalculateIsCalled_thenTheResultIsTheCorrectOne() {
|
public void whenBaseIs125AndNIs3_thenNthRootIs5() {
|
||||||
Double result = nthRootCalculator.calculate(125.0, 3.0);
|
Double result = nthRootCalculator.calculate(125.0, 3.0);
|
||||||
assertEquals(result, (Double) 5.0d);
|
assertEquals(result, (Double) 5.0d);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue