Skip to content

Commit

Permalink
Codestyle cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyBuzdin committed Jun 15, 2016
1 parent 34e2910 commit 71cefad
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ public String format() {
result.append(function.format());
}
return result.append("lr_end_transaction(\"").append(escapedTransactionName).append("\", ").append(trxFlag)
.append(");\n\n").toString();
.append(");\n\n").toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
import java.io.*;
import java.util.*;

import static lv.ctco.cukesrest.CukesOptions.ASSERTIONS_DISABLED;
import static lv.ctco.cukesrest.CukesOptions.CONTEXT_INFLATING_ENABLED;
import static lv.ctco.cukesrest.CukesOptions.LOADRUNNER_FILTER_BLOCKS_REQUESTS;
import static lv.ctco.cukesrest.CukesOptions.*;

public class CucumberLoadRunner extends ParentRunner<FeatureRunner> {
private final JUnitReporter jUnitReporter;
Expand Down Expand Up @@ -53,7 +51,7 @@ public CucumberLoadRunner(Class clazz) throws InitializationError, IOException {

final List<CucumberFeature> cucumberFeatures = runtimeOptions.cucumberFeatures(resourceLoader);
jUnitReporter = new JUnitReporter(runtimeOptions.reporter(classLoader), runtimeOptions.formatter(classLoader)
, runtimeOptions.isStrict());
, runtimeOptions.isStrict());
addChildren(cucumberFeatures);
}

Expand All @@ -65,8 +63,8 @@ public CucumberLoadRunner(Class clazz) throws InitializationError, IOException {
* @param runtimeOptions configuration
* @return a new runtime
*/
protected Runtime createRuntime(ResourceLoader resourceLoader, ClassLoader classLoader,
RuntimeOptions runtimeOptions) {
protected Runtime createRuntime(ResourceLoader resourceLoader, ClassLoader classLoader, RuntimeOptions
runtimeOptions) {
ClassFinder classFinder = new ResourceLoaderClassFinder(resourceLoader, classLoader);
return new Runtime(resourceLoader, classFinder, classLoader, runtimeOptions);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package lv.ctco.cukesrest;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.yammer.dropwizard.Service;
import com.yammer.dropwizard.config.Bootstrap;
import com.yammer.dropwizard.config.Environment;
import lv.ctco.cukesrest.gadgets.GadgetResource;
import lv.ctco.cukesrest.healthcheck.StaticTypesResource;
import com.google.inject.*;
import com.yammer.dropwizard.*;
import com.yammer.dropwizard.config.*;
import lv.ctco.cukesrest.gadgets.*;
import lv.ctco.cukesrest.healthcheck.*;

public class SampleApplication extends Service<SampleConfiguration> {
public static void main(String[] args) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package lv.ctco.cukesrest.common;

import com.google.inject.Inject;
import com.google.inject.Singleton;
import lv.ctco.cukesrest.gadgets.dto.GadgetDto;
import lv.ctco.cukesrest.gadgets.dto.GadgetType;
import lv.ctco.cukesrest.gadgets.dto.Owner;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.google.inject.*;
import lv.ctco.cukesrest.gadgets.dto.*;

import java.util.*;

import static lv.ctco.cukesrest.gadgets.dto.GadgetType.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package lv.ctco.cukesrest.common;

import com.google.inject.Inject;
import com.yammer.dropwizard.config.Configuration;
import com.google.inject.*;
import com.yammer.dropwizard.config.*;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;

public class RestUtils {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package lv.ctco.cukesrest.gadgets;

import lv.ctco.cukesrest.common.InMemoryStorage;
import lv.ctco.cukesrest.gadgets.dto.GadgetDto;
import lv.ctco.cukesrest.gadgets.dto.GadgetType;
import lv.ctco.cukesrest.common.*;
import lv.ctco.cukesrest.gadgets.dto.*;

import javax.inject.Inject;
import javax.inject.*;
import java.util.*;

public class DummyGadgetService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package lv.ctco.cukesrest.gadgets;

import com.google.inject.Inject;
import lv.ctco.cukesrest.common.RestUtils;
import lv.ctco.cukesrest.gadgets.dto.GadgetData;
import lv.ctco.cukesrest.gadgets.dto.GadgetDto;
import com.google.inject.*;
import lv.ctco.cukesrest.common.*;
import lv.ctco.cukesrest.gadgets.dto.*;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Collection;
import javax.ws.rs.core.*;
import java.util.*;

@SuppressWarnings("SameReturnValue")
@Path(GadgetResource.API)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package lv.ctco.cukesrest.gadgets.dto;

import java.util.Collection;
import java.util.*;

public class GadgetData {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package lv.ctco.cukesrest.gadgets.dto;

import java.util.Date;
import java.util.*;

public class GadgetDto {
private Integer id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package lv.ctco.cukesrest.healthcheck;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;

@SuppressWarnings("SameReturnValue")
@Path(StaticTypesResource.API)
Expand All @@ -14,15 +13,15 @@ public class StaticTypesResource {

@GET
public Response staticTypes() {
return Response.ok("{" +
" \"prop\": [" +
" {" +
" \"int\": 1," +
" \"float\": 26.505515," +
" \"long\": 2000000000000," +
" \"long\": 2000000000000" +
" }" +
"]" +
"}").build();
return Response.ok("{" +
" \"prop\": [" +
" {" +
" \"int\": 1," +
" \"float\": 26.505515," +
" \"long\": 2000000000000," +
" \"long\": 2000000000000" +
" }" +
"]" +
"}").build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@RunWith(Cucumber.class)
@CucumberOptions(
format = { "pretty" },
format = {"pretty"},
features = "classpath:features",
glue = "lv.ctco.cukesrest.api",
strict = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package lv.ctco.cukesrest.run;

import cucumber.api.CucumberOptions;
import lv.ctco.cukesrest.loadrunner.junit.CucumberLoadRunner;
import org.junit.runner.RunWith;
import cucumber.api.*;
import lv.ctco.cukesrest.loadrunner.junit.*;
import org.junit.runner.*;

@RunWith(CucumberLoadRunner.class)
@CucumberOptions(
format = { "pretty" },
format = {"pretty"},
features = "classpath:features",
glue = { "lv.ctco.cukesrest.api", "lv.ctco.cukesrest.loadrunner" },
glue = {"lv.ctco.cukesrest.api", "lv.ctco.cukesrest.loadrunner"},
strict = true
)
public class RunLoadrunnerGenerator {}

0 comments on commit 71cefad

Please sign in to comment.