Code review updates
This commit is contained in:
@@ -8,28 +8,28 @@ public class DoubleToLongUnitTest {
|
||||
final static double VALUE = 9999.999;
|
||||
|
||||
@Test
|
||||
public void using_longValue() {
|
||||
public void givenDoubleValue_whenLongValueCalled_thenLongValueReturned() {
|
||||
Assert.assertEquals(9999L, Double.valueOf(VALUE)
|
||||
.longValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void using_Math_Round() {
|
||||
public void givenDoubleValue_whenMathRoundUseds_thenLongValueReturned() {
|
||||
Assert.assertEquals(10000L, Math.round(VALUE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void using_Math_Ceil() {
|
||||
public void givenDoubleValue_whenMathCeilUsed_thenLongValueReturned() {
|
||||
Assert.assertEquals(10000L, Math.ceil(VALUE), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void using_Math_Floor() {
|
||||
public void givenDoubleValue_whenMathFloorUsed_thenLongValueReturned() {
|
||||
Assert.assertEquals(9999L, Math.floor(VALUE), 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void using_Type_Cast() {
|
||||
public void givenDoubleValue_whenTypeCasted_thenLongValueReturned() {
|
||||
Assert.assertEquals(9999L, (long) VALUE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user