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;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class NthRootCalculatorUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
private NthRootCalculator nthRootCalculator;
|
||||
private NthRootCalculator nthRootCalculator = new NthRootCalculator();
|
||||
|
||||
@Test
|
||||
public void giventThatTheBaseIs125_andTheExpIs3_whenCalculateIsCalled_thenTheResultIsTheCorrectOne() {
|
||||
public void whenBaseIs125AndNIs3_thenNthRootIs5() {
|
||||
Double result = nthRootCalculator.calculate(125.0, 3.0);
|
||||
assertEquals(result, (Double) 5.0d);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue