Skip to content

Instantly share code, notes, and snippets.

public interface ColumnInitializer<T> {
void initializeColumns(CellTable<T> table);
}
public class RatingView extends ViewWithUiHandlers<RatingUiHandlers> implements RatingPresenter.MyView {
interface Binder extends UiBinder<Widget, RatingView> {
}
@UiField
Button create;
@UiField(provided = true)
CellTable<RatingDto> ratingGrid;
private final ListDataProvider<RatingDto> ratingDataProvider;
package ca.ulaval.apapul.testutil;
import ca.ulaval.apapul.shared.NoResult;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.gwtplatform.dispatch.client.CompletedDispatchRequest;
import com.gwtplatform.dispatch.shared.Action;
import com.gwtplatform.dispatch.shared.DispatchAsync;
import com.gwtplatform.dispatch.shared.DispatchRequest;
package com.arcbees.carsample.client.application.cars.car;
import com.arcbees.carsample.client.application.cars.car.navigation.NavigationTab;
import com.arcbees.carsample.client.application.cars.car.navigation.NavigationTabEvent;
import com.google.inject.Provider;
import com.google.inject.assistedinject.Assisted;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.HandlerRegistration;
import com.gwtplatform.common.client.StandardProvider;
import com.gwtplatform.mvp.client.proxy.NotifyingAsyncCallback;
Scenario Outline: As a User, I want to be able to filter the jobs
Given I navigate to the jobdetails page
And I click on the filter icon
And I fill the filter panel fields with "<startDate>" "<endDate>" "<status>" "<codePattern>" "<code>"
When I click on the apply button
Then The parameters are changed to "<startDate>" "<endDate>" "<status>" "<codePattern>" "<code>"
Examples: Different combinations of fields
| startDate | endDate | status | codePattern | code |
| 1 | 2 | STAGED | pat123 | CODE |
@Given("^I navigate to the (\\S+) page$")
public void i_navigate_to(String nameToken) {
String url = TestParameters.BASE_URL + "#" + nameToken;
webDriver.get(url);
waitUntilDomIsLoaded(nameToken);
}
@When("^I enter my credentials as (.*)/(.*)$")
public void i_enter_my_credentials_as(String username, String password) {
Scenario: As a user, I want to be able to login, so that I can use the application
Given I navigate to the login page
When I enter my credentials as user/password
And I click on login
Then I see the jobsummary page
And I see my userid as user in the user profile panel
public class VelocityWrapper {
private final Template template;
private final VelocityContext velocityContext;
private VelocityWrapper(
VelocityEngine velocityEngine,
String templateLocation,
VelocityContext velocityContext) {
this.template = velocityEngine.getTemplate(templateLocation);
@Prefix(NameTokens.details)
public static class Tokenizer implements PlaceTokenizer<DetailsPlace> {
@Override
public StoreCategoryDetailsPlace getPlace(String token) {
MatchResult matcher = tokenRegExp.exec(token);
Long templateId = Long.parseLong(matcher.getGroup(1));
Long categoryId = Long.parseLong(matcher.getGroup(2));
return new DetailsPlace(templateId, categoryId);
private OrderResponse processPayment(Order order, Template template, String visitorId, Long orderId) {
try {
PaymentService service = ProviderFactory.getPaymentProvider(template);
if (null != service) {
// TODO this should be a transaction ofy.getTxn()
orderResponse = service.doPayment(order, template, orderId);
} else {
logger.error("PaymentService not returned.");
}
} catch (Exception e) {