Merge pull request #281 from ankurkaushal/master

Reformat according to google style guide
This commit is contained in:
Ilkka Seppälä
2015-11-02 21:39:17 +02:00
438 changed files with 8257 additions and 8382 deletions

View File

@ -1,20 +1,16 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package domainapp.integtests.bootstrap;
@ -25,30 +21,31 @@ import org.apache.isis.objectstore.jdo.datanucleus.IsisConfigurationForJdoIntegT
public class SimpleAppSystemInitializer {
public static void initIsft() {
IsisSystemForTest isft = IsisSystemForTest.getElseNull();
if(isft == null) {
isft = new SimpleAppSystemBuilder().build().setUpSystem();
IsisSystemForTest.set(isft);
}
public static void initIsft() {
IsisSystemForTest isft = IsisSystemForTest.getElseNull();
if (isft == null) {
isft = new SimpleAppSystemBuilder().build().setUpSystem();
IsisSystemForTest.set(isft);
}
}
private static class SimpleAppSystemBuilder extends IsisSystemForTest.Builder {
public SimpleAppSystemBuilder() {
withLoggingAt(org.apache.log4j.Level.INFO);
with(testConfiguration());
with(new DataNucleusPersistenceMechanismInstaller());
// services annotated with @DomainService
withServicesIn("domainapp");
}
private static class SimpleAppSystemBuilder extends IsisSystemForTest.Builder {
private static IsisConfiguration testConfiguration() {
final IsisConfigurationForJdoIntegTests testConfiguration =
new IsisConfigurationForJdoIntegTests();
public SimpleAppSystemBuilder() {
withLoggingAt(org.apache.log4j.Level.INFO);
with(testConfiguration());
with(new DataNucleusPersistenceMechanismInstaller());
// services annotated with @DomainService
withServicesIn( "domainapp" );
}
private static IsisConfiguration testConfiguration() {
final IsisConfigurationForJdoIntegTests testConfiguration = new IsisConfigurationForJdoIntegTests();
testConfiguration.addRegisterEntitiesPackagePrefix("domainapp.dom.modules");
return testConfiguration;
}
testConfiguration.addRegisterEntitiesPackagePrefix("domainapp.dom.modules");
return testConfiguration;
}
}
}

View File

@ -1,18 +1,16 @@
/**
O * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* O * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package domainapp.integtests.specglue;
@ -25,17 +23,17 @@ import domainapp.integtests.bootstrap.SimpleAppSystemInitializer;
public class BootstrappingGlue extends CukeGlueAbstract {
@Before(value={"@integration"}, order=100)
public void beforeScenarioIntegrationScope() {
org.apache.log4j.PropertyConfigurator.configure("logging.properties");
SimpleAppSystemInitializer.initIsft();
before(ScenarioExecutionScope.INTEGRATION);
}
@Before(value = {"@integration"}, order = 100)
public void beforeScenarioIntegrationScope() {
org.apache.log4j.PropertyConfigurator.configure("logging.properties");
SimpleAppSystemInitializer.initIsft();
@After
public void afterScenario(cucumber.api.Scenario sc) {
assertMocksSatisfied();
after(sc);
}
before(ScenarioExecutionScope.INTEGRATION);
}
@After
public void afterScenario(cucumber.api.Scenario sc) {
assertMocksSatisfied();
after(sc);
}
}

View File

@ -1,18 +1,16 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package domainapp.integtests.specglue;
@ -23,9 +21,8 @@ import domainapp.fixture.scenarios.RecreateSimpleObjects;
public class CatalogOfFixturesGlue extends CukeGlueAbstract {
@Before(value={"@integration", "@SimpleObjectsFixture"}, order=20000)
public void integrationFixtures() throws Throwable {
scenarioExecution().install(new RecreateSimpleObjects());
}
@Before(value = {"@integration", "@SimpleObjectsFixture"}, order = 20000)
public void integrationFixtures() throws Throwable {
scenarioExecution().install(new RecreateSimpleObjects());
}
}

View File

@ -1,18 +1,16 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package domainapp.integtests.specglue.modules.simple;
@ -30,21 +28,21 @@ import static org.junit.Assert.assertThat;
public class SimpleObjectGlue extends CukeGlueAbstract {
@Given("^there are.* (\\d+) simple objects$")
public void there_are_N_simple_objects(int n) throws Throwable {
try {
final List<SimpleObject> findAll = service(SimpleObjects.class).listAll();
assertThat(findAll.size(), is(n));
putVar("list", "all", findAll);
} finally {
assertMocksSatisfied();
}
@Given("^there are.* (\\d+) simple objects$")
public void there_are_N_simple_objects(int n) throws Throwable {
try {
final List<SimpleObject> findAll = service(SimpleObjects.class).listAll();
assertThat(findAll.size(), is(n));
putVar("list", "all", findAll);
} finally {
assertMocksSatisfied();
}
@When("^I create a new simple object$")
public void I_create_a_new_simple_object() throws Throwable {
service(SimpleObjects.class).create(UUID.randomUUID().toString());
}
}
@When("^I create a new simple object$")
public void I_create_a_new_simple_object() throws Throwable {
service(SimpleObjects.class).create(UUID.randomUUID().toString());
}
}

View File

@ -1,18 +1,16 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package domainapp.integtests.specs;
@ -23,17 +21,12 @@ import cucumber.api.junit.Cucumber;
/**
* Runs scenarios in all <tt>.feature</tt> files (this package and any subpackages).
* Runs scenarios in all <tt>.feature</tt> files (this package and any subpackages).
*/
@RunWith(Cucumber.class)
@CucumberOptions(
format = {
"html:target/cucumber-html-report"
,"json:target/cucumber.json"
},
glue={"classpath:domainapp.integtests.specglue"},
strict = true,
tags = { "~@backlog", "~@ignore" })
@CucumberOptions(format = {"html:target/cucumber-html-report", "json:target/cucumber.json"},
glue = {"classpath:domainapp.integtests.specglue"}, strict = true, tags = {"~@backlog",
"~@ignore"})
public class RunSpecs {
// intentionally empty
// intentionally empty
}