Merge pull request #5373 from eugenp/fix-nth-root
removed unnecessary Mockito and refactored test method name
This commit is contained in:
commit
4e53cd8046
|
@ -7,14 +7,12 @@ import org.junit.runner.RunWith;
|
||||||
import org.mockito.InjectMocks;
|
import org.mockito.InjectMocks;
|
||||||
import org.mockito.junit.MockitoJUnitRunner;
|
import org.mockito.junit.MockitoJUnitRunner;
|
||||||
|
|
||||||
@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