diff --git a/src/main/java/RewardValue.java b/src/main/java/RewardValue.java new file mode 100644 index 000000000..f24e46d18 --- /dev/null +++ b/src/main/java/RewardValue.java @@ -0,0 +1,4 @@ +package PACKAGE_NAME; + +public class RewardValue { +} diff --git a/src/test/java/RewardValueTests.java b/src/test/java/RewardValueTests.java index b3a78de7d..d651bf6da 100644 --- a/src/test/java/RewardValueTests.java +++ b/src/test/java/RewardValueTests.java @@ -1,5 +1,4 @@ import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertEquals; public class RewardValueTests { @@ -20,11 +19,17 @@ void create_with_miles_value() { @Test void convert_from_cash_to_miles() { - assert false; + double cashValue = 100; + var rewardValue = new RewardValue(cashValue); + int expectedMilesValue = (int) (cashValue / 0.02); // Assuming conversion rate is 1 mile = $0.02 + assertEquals(expectedMilesValue, rewardValue.getMilesValue()); } @Test void convert_from_miles_to_cash() { - assert false; + int milesValue = 10000; + var rewardValue = new RewardValue(milesValue); + double expectedCashValue = milesValue * 0.02; // Assuming conversion rate is 1 mile = $0.02 + assertEquals(expectedCashValue, rewardValue.getCashValue()); } -} +} \ No newline at end of file