diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/EarningPoints.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/EarningPoints.java index 954dc73..d5f6fae 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/EarningPoints.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/EarningPoints.java @@ -9,6 +9,6 @@ public class EarningPoints extends ThucydidesJUnitStories { public EarningPoints() { - this.findStoriesIn("stories/earning_points"); + findStoriesIn("stories/earning_points"); } } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/ManagingAirports.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/ManagingAirports.java index d1a8ea5..782cb4c 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/ManagingAirports.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/ManagingAirports.java @@ -8,6 +8,6 @@ public class ManagingAirports extends ThucydidesJUnitStories { public ManagingAirports() { - this.findStoriesIn("stories/managing_airports"); + findStoriesIn("stories/managing_airports"); } } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/Partners.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/Partners.java index f6165f8..5a469aa 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/Partners.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/Partners.java @@ -8,6 +8,6 @@ public class Partners extends ThucydidesJUnitStories { public Partners() { - this.findStoriesIn("stories/partners"); + findStoriesIn("stories/partners"); } } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/SpendingPoints.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/SpendingPoints.java index 4fa84f0..a46763e 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/SpendingPoints.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/SpendingPoints.java @@ -8,6 +8,6 @@ public class SpendingPoints extends ThucydidesJUnitStories { public SpendingPoints() { - this.findStoriesIn("stories/spending_points"); + findStoriesIn("stories/spending_points"); } } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/MyAccountStepUIDefinitions.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/MyAccountStepUIDefinitions.java index 5a9a5da..79f07b9 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/MyAccountStepUIDefinitions.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/MyAccountStepUIDefinitions.java @@ -1,18 +1,11 @@ package flyinghigh.services.acceptancetests.stepdefs; -import flyinghigh.services.acceptancetests.domain.Airport; -import flyinghigh.services.acceptancetests.pages.HomePage; -import flyinghigh.services.acceptancetests.pages.MyAccountPage; -import flyinghigh.services.acceptancetests.rest.RestClient; -import flyinghigh.services.acceptancetests.steps.AirportClientSteps; import flyinghigh.services.acceptancetests.steps.MyAccountUISteps; import net.thucydides.core.annotations.Steps; import org.jbehave.core.annotations.Given; import org.jbehave.core.annotations.Then; import org.jbehave.core.annotations.When; -import java.util.List; - import static org.fest.assertions.api.Assertions.assertThat; @@ -33,15 +26,13 @@ public void openMyAccountPage() { @When("I calculate the points needed to go from to ") public void calculatePointsNeeded(String departure, String destination) { -// TODO -// calculatedPoints = myAccountSteps.calculatePointsNeededBetween(departure, -// destination); + calculatedPoints = myAccountSteps.calculatePointsNeededBetween(departure, + destination); } @Then("I should see points") public void shouldSeeRequiredPoints(int requiredPoints) { -// TODO -// assertThat(calculatedPoints).isEqualTo(requiredPoints); + assertThat(calculatedPoints).isEqualTo(requiredPoints); } diff --git a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/RouteStepDefinitions.java b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/RouteStepDefinitions.java index 8e901d5..46a2d4c 100644 --- a/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/RouteStepDefinitions.java +++ b/acceptance-tests/src/test/java/flyinghigh/services/acceptancetests/stepdefs/RouteStepDefinitions.java @@ -27,13 +27,11 @@ public void setDepartureAndDestination(String departure, String destination) { } @When("I calculate the number of required points") public void calculateRequiredPoints() { -// TODO -// calculatedPoints = restClient.calculateRequiredPoints(departure, destination); + calculatedPoints = restClient.calculateRequiredPoints(departure, destination); } @Then("I should obtain ") public void checkCalculatedPoints(int requiredPoints) { -// TODO -// assertThat(calculatedPoints).isEqualTo(requiredPoints); + assertThat(calculatedPoints).isEqualTo(requiredPoints); } } diff --git a/accounts-web-service/src/main/java/flyinghigh/services/accounts/repositories/AccountRepository.java b/accounts-web-service/src/main/java/flyinghigh/services/accounts/repositories/AccountRepository.java index 09de40b..33f9cc4 100644 --- a/accounts-web-service/src/main/java/flyinghigh/services/accounts/repositories/AccountRepository.java +++ b/accounts-web-service/src/main/java/flyinghigh/services/accounts/repositories/AccountRepository.java @@ -8,4 +8,4 @@ @RepositoryRestResource(collectionResourceRel = "accounts", path = "accounts") public interface AccountRepository extends MongoRepository { FrequentFlyerMember findByAccountNumber(@Param("number") String number); -} \ No newline at end of file + FrequentFlyerMember findByFirstNameAndLastName(@Param("firstName") String firstName, @Param("lasttName") String lastName);} \ No newline at end of file