net.serenitybdd.screenplay.Question Java Examples

The following examples show how to use net.serenitybdd.screenplay.Question. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThePortfolio.java    From bdd-trader with Apache License 2.0 5 votes vote down vote up
public static Question<Float> cashBalanceFor(Client client) {

        return new RestQuestionBuilder<Float>().about("Cash account balance")
                .to(BDDTraderEndPoints.ClientPortfolio.path())
                .with(request -> request.pathParam("clientId", client.getId()))
                .returning(response -> response.path("cash"));

    }
 
Example #2
Source File: ThePortfolio.java    From bdd-trader with Apache License 2.0 5 votes vote down vote up
public static Question<Integer> idFor(Client client) {

        return new RestQuestionBuilder<Integer>().about("Cash account balance")
                .to(BDDTraderEndPoints.ClientPortfolio.path())
                .with(request -> request.pathParam("clientId", client.getId()))
                .returning(response -> response.path("portfolioId"));

    }
 
Example #3
Source File: ThePortfolio.java    From bdd-trader with Apache License 2.0 5 votes vote down vote up
public static Question<List<Position>> positionsForClient(Client registeredClient) {

        return new RestQuestionBuilder<List<Position>>()
                .about("positions for client " + registeredClient)
                .to(BDDTraderEndPoints.ClientPortfolioPositions.path())
                .with(request -> request.pathParam("clientId", registeredClient.getId()))
                .returning(response -> response.jsonPath().getList("", Position.class));

    }
 
Example #4
Source File: SearchResults.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 4 votes vote down vote up
public static Question<ElementAvailability> resultsGrid() {
    return new SearchResultsGrid();
}
 
Example #5
Source File: SearchResults.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 4 votes vote down vote up
public static Question<ElementAvailability> price() {
    return new SearchResultsGridItemPrice();
}
 
Example #6
Source File: SearchResults.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 4 votes vote down vote up
public static Question<String> checkForTitle() {
    return new SearchResultsResponseTitle();
}
 
Example #7
Source File: TheCurrent.java    From base_project_for_web_automation_projects with MIT License 4 votes vote down vote up
public static Question<String> url() {
    return new TheCurrent();
}
 
Example #8
Source File: TheItemStatus.java    From serenity-documentation with Apache License 2.0 4 votes vote down vote up
public static Question<?> forTheItemCalled(String itemName) {
    return Instrumented.instanceOf(TheItemStatus.class).withProperties(itemName);
}
 
Example #9
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public Question<ProjectInformation> information() {
    return new ProjectWidgetInformation(projectOfInterest);
}
 
Example #10
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public Question<WebElementState> state() {
    return new ProjectWidgetState(projectOfInterest);
}
 
Example #11
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public Question<String> details() {
    return new ProjectWidgetDetails(projectOfInterest);
}
 
Example #12
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public Question<WebElementState> badges() {
    return new ProjectBadgesState(projectOfInterest);
}
 
Example #13
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License 4 votes vote down vote up
public Question<String> pipelineStages() {
    return new ProjectWidgetPipelineStages(projectOfInterest);
}
 
Example #14
Source File: GoogleSearchResults.java    From tutorials with MIT License 4 votes vote down vote up
public static Question<List<String>> displayed() {
    return new GoogleSearchResults();
}
 
Example #15
Source File: ProjectWidget.java    From jenkins-build-monitor-plugin with MIT License votes vote down vote up
public Question<String> executedBuilds() { return new ProjectWidgetBuilds(projectOfInterest); }