http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/pom.xml b/example/application/todoapp/fixture/pom.xml deleted file mode 100644 index 8881b6e..0000000 --- a/example/application/todoapp/fixture/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.isis.example.application</groupId> - <artifactId>todoapp</artifactId> - <version>1.8.0-SNAPSHOT</version> - </parent> - - <artifactId>todoapp-fixture</artifactId> - <name>ToDo App Fixtures</name> - - <dependencies> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>todoapp-dom</artifactId> - </dependency> - </dependencies> - -</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java deleted file mode 100644 index 15bc3a9..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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 fixture.todo; - -import fixture.todo.scenarios.ToDoItemsRecreateAndCompleteSeveral; - -import java.util.List; -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.ActionLayout; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.DomainServiceLayout; -import org.apache.isis.applib.annotation.RestrictTo; -import org.apache.isis.applib.annotation.MemberOrder; -import org.apache.isis.applib.annotation.Optionality; -import org.apache.isis.applib.annotation.Parameter; -import org.apache.isis.applib.annotation.ParameterLayout; -import org.apache.isis.applib.fixturescripts.FixtureResult; -import org.apache.isis.applib.fixturescripts.FixtureScript; -import org.apache.isis.applib.fixturescripts.FixtureScripts; - -/** - * Enables fixtures to be installed from the application. - */ -@DomainService -@DomainServiceLayout( - named = "Prototyping", - menuBar = DomainServiceLayout.MenuBar.SECONDARY, - menuOrder = "10") -public class ToDoItemsFixturesService extends FixtureScripts { - - public ToDoItemsFixturesService() { - super("fixture.todo"); - } - - @ActionLayout( - cssClassFa="fa fa-bolt" - ) - @Action( - restrictTo = RestrictTo.PROTOTYPING - ) - @Override - public List<FixtureResult> runFixtureScript( - final FixtureScript fixtureScript, - @ParameterLayout( - named="Parameters", - describedAs = "Script-specific parameters (key=value) ", - multiLine = 10) - @Parameter(optionality = Optionality.OPTIONAL) - final String parameters) { - return super.runFixtureScript(fixtureScript, parameters); - } - - @Override - public FixtureScript default0RunFixtureScript() { - return findFixtureScriptFor(ToDoItemsRecreateAndCompleteSeveral.class); - } - - /** - * Raising visibility to <tt>public</tt> so that choices are available for first param - * of {@link #runFixtureScript(FixtureScript, String)}. - */ - @Override - public List<FixtureScript> choices0RunFixtureScript() { - return super.choices0RunFixtureScript(); - } - - // ////////////////////////////////////// - - - @ActionLayout( - cssClassFa="fa fa-list" - ) - @Action( - restrictTo = RestrictTo.PROTOTYPING - ) - @MemberOrder(sequence="20") - public Object recreateToDoItemsReturnFirst() { - final List<FixtureResult> run = findFixtureScriptFor(ToDoItemsRecreateAndCompleteSeveral.class).run(null); - return run.get(0).getObject(); - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/integtests/ToDoItemsIntegTestFixture.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/integtests/ToDoItemsIntegTestFixture.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/integtests/ToDoItemsIntegTestFixture.java deleted file mode 100644 index 2634839..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/integtests/ToDoItemsIntegTestFixture.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 fixture.todo.integtests; - -import fixture.todo.scenarios.ToDoItemsRecreateAndCompleteSeveral; - -import org.apache.isis.applib.fixturescripts.FixtureScript; - -/** - * Refactored to reuse the newer {@link FixtureScript} API. - */ -public class ToDoItemsIntegTestFixture extends FixtureScript { - - public ToDoItemsIntegTestFixture() { - super(null, "integ-test"); - } - - @Override - protected void execute(ExecutionContext executionContext) { - executionContext.executeChild(this, new ToDoItemsRecreateAndCompleteSeveral()); - } - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteAbstract.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteAbstract.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteAbstract.java deleted file mode 100644 index 3e009fe..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteAbstract.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 fixture.todo.items.actions.complete; - -import dom.todo.ToDoItem; - -import java.util.Collection; -import com.google.common.base.Objects; -import com.google.common.base.Predicate; -import com.google.common.collect.Collections2; -import org.apache.isis.applib.fixturescripts.FixtureScript; - -public abstract class ToDoItemCompleteAbstract extends FixtureScript { - - /** - * Looks up item from repository, and completes. - */ - protected void complete(final String description, final ExecutionContext executionContext) { - String ownedBy = executionContext.getParameter("ownedBy"); - final ToDoItem toDoItem = findToDoItem(description, ownedBy); - toDoItem.setComplete(true); - executionContext.addResult(this, toDoItem); - } - - private ToDoItem findToDoItem(final String description, final String ownedBy) { - final Collection<ToDoItem> filtered = Collections2.filter(getContainer().allInstances(ToDoItem.class), new Predicate<ToDoItem>() { - @Override - public boolean apply(ToDoItem input) { - return Objects.equal(description, input.getDescription()) && - Objects.equal(ownedBy, input.getOwnedBy()); - } - }); - return filtered.isEmpty()? null: filtered.iterator().next(); - } - //endregion -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForBuyStamps.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForBuyStamps.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForBuyStamps.java deleted file mode 100644 index b05bf36..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForBuyStamps.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 fixture.todo.items.actions.complete; - -import fixture.todo.items.create.ToDoItemForBuyStamps; - -public class ToDoItemCompleteForBuyStamps extends ToDoItemCompleteAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - complete(ToDoItemForBuyStamps.DESCRIPTION, executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForWriteBlogPost.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForWriteBlogPost.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForWriteBlogPost.java deleted file mode 100644 index 4b620f4..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/actions/complete/ToDoItemCompleteForWriteBlogPost.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 fixture.todo.items.actions.complete; - -import fixture.todo.items.create.ToDoItemForWriteBlogPost; - -public class ToDoItemCompleteForWriteBlogPost extends ToDoItemCompleteAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - complete(ToDoItemForWriteBlogPost.DESCRIPTION, executionContext); - } - - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemAbstract.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemAbstract.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemAbstract.java deleted file mode 100644 index 3586c86..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemAbstract.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem; -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; -import dom.todo.ToDoItems; - -import java.math.BigDecimal; -import org.joda.time.LocalDate; -import org.apache.isis.applib.fixturescripts.FixtureScript; -import org.apache.isis.applib.services.clock.ClockService; - -public abstract class ToDoItemAbstract extends FixtureScript { - - protected ToDoItem createToDoItem( - final String description, - final Category category, final Subcategory subcategory, - final LocalDate dueBy, - final BigDecimal cost, - final ExecutionContext executionContext) { - - // validate parameters - final String ownedBy = executionContext.getParameter("ownedBy"); - if(ownedBy == null) { - throw new IllegalArgumentException("'ownedBy' must be specified"); - } - - // execute - ToDoItem newToDo = toDoItems.newToDo( - description, category, subcategory, ownedBy, dueBy, cost); - return executionContext.addResult(this, newToDo); - } - - protected LocalDate nowPlusDays(int days) { - return clockService.now().plusDays(days); - } - - protected BigDecimal BD(String str) { - return new BigDecimal(str); - } - - //region > injected services - @javax.inject.Inject - private ToDoItems toDoItems; - - @javax.inject.Inject - protected ClockService clockService; - //endregion - - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyBread.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyBread.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyBread.java deleted file mode 100644 index 0bcde45..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyBread.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForBuyBread extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Buy bread", - Category.Domestic, Subcategory.Shopping, - nowPlusDays(0), - BD("1.75"), - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyMilk.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyMilk.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyMilk.java deleted file mode 100644 index da6d25e..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyMilk.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForBuyMilk extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Buy milk", - Category.Domestic, Subcategory.Shopping, - nowPlusDays(0), - BD("0.75"), - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyStamps.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyStamps.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyStamps.java deleted file mode 100644 index 4c6fb70..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForBuyStamps.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForBuyStamps extends ToDoItemAbstract { - - public static final String DESCRIPTION = "Buy stamps"; - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - DESCRIPTION, - Category.Domestic, Subcategory.Shopping, - nowPlusDays(0), - BD("10.00"), - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForMowLawn.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForMowLawn.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForMowLawn.java deleted file mode 100644 index daf4e2e..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForMowLawn.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForMowLawn extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Mow lawn", - Category.Domestic, Subcategory.Garden, - nowPlusDays(6), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForOrganizeBrownBag.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForOrganizeBrownBag.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForOrganizeBrownBag.java deleted file mode 100644 index d4c01a7..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForOrganizeBrownBag.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForOrganizeBrownBag extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Organize brown bag", - Category.Professional, Subcategory.Consulting, - nowPlusDays(14), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForPickUpLaundry.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForPickUpLaundry.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForPickUpLaundry.java deleted file mode 100644 index 5d9a309..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForPickUpLaundry.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForPickUpLaundry extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Pick up laundry", - Category.Domestic, Subcategory.Chores, - nowPlusDays(6), - BD("7.50"), - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSharpenKnives.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSharpenKnives.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSharpenKnives.java deleted file mode 100644 index c850993..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSharpenKnives.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForSharpenKnives extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Sharpen knives", - Category.Domestic, Subcategory.Chores, - nowPlusDays(14), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForStageIsisRelease.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForStageIsisRelease.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForStageIsisRelease.java deleted file mode 100644 index d9544ab..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForStageIsisRelease.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForStageIsisRelease extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Stage Isis release", - Category.Professional, Subcategory.OpenSource, - null, - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSubmitConferenceSession.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSubmitConferenceSession.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSubmitConferenceSession.java deleted file mode 100644 index 86e7177..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForSubmitConferenceSession.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForSubmitConferenceSession extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Submit conference session", - Category.Professional, Subcategory.Education, - nowPlusDays(21), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForVacuumHouse.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForVacuumHouse.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForVacuumHouse.java deleted file mode 100644 index 64f4ab4..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForVacuumHouse.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForVacuumHouse extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Vacuum house", - Category.Domestic, Subcategory.Housework, - nowPlusDays(3), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteBlogPost.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteBlogPost.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteBlogPost.java deleted file mode 100644 index 8d912ad..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteBlogPost.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForWriteBlogPost extends ToDoItemAbstract { - - public static final String DESCRIPTION = "Write blog post"; - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - DESCRIPTION, - Category.Professional, Subcategory.Marketing, - nowPlusDays(7), - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteToPenPal.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteToPenPal.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteToPenPal.java deleted file mode 100644 index eb495a2..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/create/ToDoItemForWriteToPenPal.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 fixture.todo.items.create; - -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItem.Subcategory; - -public class ToDoItemForWriteToPenPal extends ToDoItemAbstract { - - @Override - protected void execute(ExecutionContext executionContext) { - - createToDoItem( - "Write to penpal", - Category.Other, Subcategory.Other, - null, - null, - executionContext); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/items/delete/ToDoItemsDelete.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/delete/ToDoItemsDelete.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/items/delete/ToDoItemsDelete.java deleted file mode 100644 index 3ac08bc..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/items/delete/ToDoItemsDelete.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 fixture.todo.items.delete; - -import org.apache.isis.applib.fixturescripts.FixtureScript; -import org.apache.isis.applib.services.jdosupport.IsisJdoSupport; - -public class ToDoItemsDelete extends FixtureScript { - - //region > execute - protected void execute(ExecutionContext executionContext) { - final String ownedBy = executionContext.getParameter("ownedBy"); - isisJdoSupport.executeUpdate("delete from \"ToDoItem\" where \"ownedBy\" = '" + ownedBy + "'"); - } - //endregion - - //region > injected services - @javax.inject.Inject - private IsisJdoSupport isisJdoSupport; - //endregion - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreate.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreate.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreate.java deleted file mode 100644 index 5e61cc2..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreate.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 fixture.todo.scenarios; - -import fixture.todo.items.delete.ToDoItemsDelete; -import fixture.todo.items.create.ToDoItemForBuyBread; -import fixture.todo.items.create.ToDoItemForBuyMilk; -import fixture.todo.items.create.ToDoItemForBuyStamps; -import fixture.todo.items.create.ToDoItemForMowLawn; -import fixture.todo.items.create.ToDoItemForOrganizeBrownBag; -import fixture.todo.items.create.ToDoItemForPickUpLaundry; -import fixture.todo.items.create.ToDoItemForSharpenKnives; -import fixture.todo.items.create.ToDoItemForStageIsisRelease; -import fixture.todo.items.create.ToDoItemForSubmitConferenceSession; -import fixture.todo.items.create.ToDoItemForVacuumHouse; -import fixture.todo.items.create.ToDoItemForWriteBlogPost; -import fixture.todo.items.create.ToDoItemForWriteToPenPal; -import fixture.todo.util.Util; - -import org.apache.isis.applib.fixturescripts.FixtureScript; - -public class ToDoItemsRecreate extends FixtureScript { - - public ToDoItemsRecreate() { - withDiscoverability(Discoverability.DISCOVERABLE); - } - - //region > ownedBy (optional) - private String ownedBy; - - public String getOwnedBy() { - return ownedBy; - } - - public void setOwnedBy(String ownedBy) { - this.ownedBy = ownedBy; - } - //endregion - - @Override - protected void execute(ExecutionContext executionContext) { - - // defaults - executionContext.setParameterIfNotPresent( - "ownedBy", - Util.coalesce(getOwnedBy(), getContainer().getUser().getName())); - - // prereqs - executionContext.executeChild(this, new ToDoItemsDelete()); - - // create items - executionContext.executeChild(this, new ToDoItemForBuyMilk()); - executionContext.executeChild(this, new ToDoItemForBuyBread()); - executionContext.executeChild(this, new ToDoItemForBuyStamps()); - executionContext.executeChild(this, new ToDoItemForPickUpLaundry()); - executionContext.executeChild(this, new ToDoItemForMowLawn()); - executionContext.executeChild(this, new ToDoItemForVacuumHouse()); - executionContext.executeChild(this, new ToDoItemForSharpenKnives()); - executionContext.executeChild(this, new ToDoItemForWriteToPenPal()); - executionContext.executeChild(this, new ToDoItemForWriteBlogPost()); - executionContext.executeChild(this, new ToDoItemForOrganizeBrownBag()); - executionContext.executeChild(this, new ToDoItemForSubmitConferenceSession()); - executionContext.executeChild(this, new ToDoItemForStageIsisRelease()); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveral.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveral.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveral.java deleted file mode 100644 index d0645a2..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveral.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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 fixture.todo.scenarios; - -import fixture.todo.items.actions.complete.ToDoItemCompleteForBuyStamps; -import fixture.todo.items.actions.complete.ToDoItemCompleteForWriteBlogPost; -import fixture.todo.items.create.ToDoItemForBuyBread; -import fixture.todo.items.create.ToDoItemForBuyMilk; -import fixture.todo.items.create.ToDoItemForBuyStamps; -import fixture.todo.items.create.ToDoItemForMowLawn; -import fixture.todo.items.create.ToDoItemForOrganizeBrownBag; -import fixture.todo.items.create.ToDoItemForPickUpLaundry; -import fixture.todo.items.create.ToDoItemForSharpenKnives; -import fixture.todo.items.create.ToDoItemForStageIsisRelease; -import fixture.todo.items.create.ToDoItemForSubmitConferenceSession; -import fixture.todo.items.create.ToDoItemForVacuumHouse; -import fixture.todo.items.create.ToDoItemForWriteBlogPost; -import fixture.todo.items.create.ToDoItemForWriteToPenPal; -import fixture.todo.items.delete.ToDoItemsDelete; -import fixture.todo.util.Util; - -import org.apache.isis.applib.fixturescripts.FixtureScript; - -public class ToDoItemsRecreateAndCompleteSeveral extends FixtureScript { - - public ToDoItemsRecreateAndCompleteSeveral() { - withDiscoverability(Discoverability.DISCOVERABLE); - } - - //region > ownedBy (optional) - private String ownedBy; - - public String getOwnedBy() { - return ownedBy; - } - - public void setOwnedBy(String ownedBy) { - this.ownedBy = ownedBy; - } - //endregion - - @Override - protected void execute(ExecutionContext executionContext) { - - // defaults - executionContext.setParameterIfNotPresent( - "ownedBy", - Util.coalesce(getOwnedBy(), getContainer().getUser().getName())); - - executionContext.executeChild(this, new ToDoItemsDelete()); - - // create items - executionContext.executeChild(this, new ToDoItemForBuyMilk()); - executionContext.executeChild(this, new ToDoItemForBuyBread()); - executionContext.executeChild(this, new ToDoItemForBuyStamps()); - executionContext.executeChild(this, new ToDoItemForPickUpLaundry()); - executionContext.executeChild(this, new ToDoItemForMowLawn()); - executionContext.executeChild(this, new ToDoItemForVacuumHouse()); - executionContext.executeChild(this, new ToDoItemForSharpenKnives()); - executionContext.executeChild(this, new ToDoItemForWriteToPenPal()); - executionContext.executeChild(this, new ToDoItemForWriteBlogPost()); - executionContext.executeChild(this, new ToDoItemForOrganizeBrownBag()); - executionContext.executeChild(this, new ToDoItemForSubmitConferenceSession()); - executionContext.executeChild(this, new ToDoItemForStageIsisRelease()); - - // this fixture - executionContext.executeChild(this, new ToDoItemCompleteForBuyStamps()); - executionContext.executeChild(this, new ToDoItemCompleteForWriteBlogPost()); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForDick.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForDick.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForDick.java deleted file mode 100644 index 60d5a10..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForDick.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 fixture.todo.scenarios; - -public final class ToDoItemsRecreateAndCompleteSeveralForDick extends ToDoItemsRecreateAndCompleteSeveral { - - public ToDoItemsRecreateAndCompleteSeveralForDick() { - withDiscoverability(Discoverability.DISCOVERABLE); - - setOwnedBy("dick"); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForJoe.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForJoe.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForJoe.java deleted file mode 100644 index b324f34..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateAndCompleteSeveralForJoe.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 fixture.todo.scenarios; - -public final class ToDoItemsRecreateAndCompleteSeveralForJoe extends ToDoItemsRecreateAndCompleteSeveral { - - public ToDoItemsRecreateAndCompleteSeveralForJoe() { - withDiscoverability(Discoverability.DISCOVERABLE); - - setOwnedBy("joe"); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateForSven.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateForSven.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateForSven.java deleted file mode 100644 index 16db8a7..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/scenarios/ToDoItemsRecreateForSven.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 fixture.todo.scenarios; - -public final class ToDoItemsRecreateForSven extends ToDoItemsRecreate { - - public ToDoItemsRecreateForSven() { - withDiscoverability(Discoverability.DISCOVERABLE); - - setOwnedBy("sven"); - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/fixture/src/main/java/fixture/todo/util/Util.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/fixture/src/main/java/fixture/todo/util/Util.java b/example/application/todoapp/fixture/src/main/java/fixture/todo/util/Util.java deleted file mode 100644 index a385588..0000000 --- a/example/application/todoapp/fixture/src/main/java/fixture/todo/util/Util.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 fixture.todo.util; - -public final class Util { - - private Util(){} - - public static String coalesce(final String... strings) { - for (String str : strings) { - if(str != null) { return str; } - } - return null; - } - -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/logging.properties ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/logging.properties b/example/application/todoapp/integtests/logging.properties deleted file mode 100644 index 1e4d987..0000000 --- a/example/application/todoapp/integtests/logging.properties +++ /dev/null @@ -1,101 +0,0 @@ -# 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. - - -# -# Isis uses log4j is used to provide system logging -# -log4j.rootCategory=INFO, Console - -# The console appender -log4j.appender.Console=org.apache.log4j.ConsoleAppender -log4j.appender.Console.target=System.out -log4j.appender.Console.layout=org.apache.log4j.PatternLayout -log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n - -log4j.appender.File=org.apache.log4j.RollingFileAppender -log4j.appender.File.file=isis.log -log4j.appender.File.append=false -log4j.appender.File.layout=org.apache.log4j.PatternLayout -log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n - -! turn on the internal log4j debugging flag so we can see what it is doing -#log4j.debug=true - -# DataNucleus -# the first two log the DML and DDL (if set to DEBUG) -log4j.logger.DataNucleus.Datastore.Native=WARN, Console -log4j.logger.DataNucleus.Datastore.Schema=DEBUG, Console -# the remainder can probably be left to WARN -log4j.logger.DataNucleus.Persistence=WARN, Console -log4j.logger.DataNucleus.Transaction=WARN, Console -log4j.logger.DataNucleus.Connection=WARN, Console -log4j.logger.DataNucleus.Query=WARN, Console -log4j.logger.DataNucleus.Cache=WARN, Console -log4j.logger.DataNucleus.MetaData=WARN, Console -log4j.logger.DataNucleus.Datastore=WARN, Console -log4j.logger.DataNucleus.Datastore.Persist=WARN, Console -log4j.logger.DataNucleus.Datastore.Retrieve=WARN, Console -log4j.logger.DataNucleus.General=WARN, Console -log4j.logger.DataNucleus.Lifecycle=WARN, Console -log4j.logger.DataNucleus.ValueGeneration=WARN, Console -log4j.logger.DataNucleus.Enhancer=WARN, Console -log4j.logger.DataNucleus.SchemaTool=ERROR, Console -log4j.logger.DataNucleus.JDO=WARN, Console -log4j.logger.DataNucleus.JPA=ERROR, Console -log4j.logger.DataNucleus.JCA=WARN, Console -log4j.logger.DataNucleus.IDE=ERROR, Console - -log4j.additivity.DataNucleus.Datastore.Native=false -log4j.additivity.DataNucleus.Datastore.Schema=false -log4j.additivity.DataNucleus.Datastore.Persistence=false -log4j.additivity.DataNucleus.Datastore.Transaction=false -log4j.additivity.DataNucleus.Datastore.Connection=false -log4j.additivity.DataNucleus.Datastore.Query=false -log4j.additivity.DataNucleus.Datastore.Cache=false -log4j.additivity.DataNucleus.Datastore.MetaData=false -log4j.additivity.DataNucleus.Datastore.Datastore=false -log4j.additivity.DataNucleus.Datastore.Datastore.Persist=false -log4j.additivity.DataNucleus.Datastore.Datastore.Retrieve=false -log4j.additivity.DataNucleus.Datastore.General=false -log4j.additivity.DataNucleus.Datastore.Lifecycle=false -log4j.additivity.DataNucleus.Datastore.ValueGeneration=false -log4j.additivity.DataNucleus.Datastore.Enhancer=false -log4j.additivity.DataNucleus.Datastore.SchemaTool=false -log4j.additivity.DataNucleus.Datastore.JDO=false -log4j.additivity.DataNucleus.Datastore.JPA=false -log4j.additivity.DataNucleus.Datastore.JCA=false -log4j.additivity.DataNucleus.Datastore.IDE=false - - - - -# if using log4jdbc-remix as JDBC driver -#log4j.logger.jdbc.sqlonly=DEBUG, sql, Console -#log4j.additivity.jdbc.sqlonly=false -#log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console -#log4j.additivity.jdbc.resultsettable=false - -#log4j.logger.jdbc.audit=WARN,jdbc, Console -#log4j.additivity.jdbc.audit=false -#log4j.logger.jdbc.resultset=WARN,jdbc -#log4j.additivity.jdbc.resultset=false -#log4j.logger.jdbc.sqltiming=WARN,sqltiming -#log4j.additivity.jdbc.sqltiming=false -#log4j.logger.jdbc.connection=FATAL,connection -#log4j.additivity.jdbc.connection=false - http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/pom.xml b/example/application/todoapp/integtests/pom.xml deleted file mode 100644 index 3186102..0000000 --- a/example/application/todoapp/integtests/pom.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.isis.example.application</groupId> - <artifactId>todoapp</artifactId> - <version>1.8.0-SNAPSHOT</version> - </parent> - - <artifactId>todoapp-integtests</artifactId> - <name>ToDo App Integration Tests</name> - - <build> - <testResources> - <testResource> - <filtering>false</filtering> - <directory>src/test/resources</directory> - </testResource> - <testResource> - <filtering>false</filtering> - <directory>src/test/java</directory> - <includes> - <include>**</include> - </includes> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </testResource> - </testResources> - <plugins> - <!-- - uncomment for enhanced cucumber-jvm reporting - http://www.masterthought.net/section/cucumber-reporting - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <testfailureignore>true</testfailureignore> - </configuration> - </plugin> - <plugin> - <groupId>net.masterthought</groupId> - <artifactId>maven-cucumber-reporting</artifactId> - <version>0.0.3</version> - <executions> - <execution> - <id>execution</id> - <phase>verify</phase> - <goals> - <goal>generate</goal> - </goals> - <configuration> - <projectname>cucumber-jvm-example</projectname> - <outputdirectory>${project.build.directory}/cucumber-reports</outputdirectory> - <cucumberoutput>${project.build.directory}/cucumber.json</cucumberoutput> - <enableflashcharts>false</enableflashcharts> - </configuration> - </execution> - </executions> - </plugin> - --> - </plugins> - </build> - <dependencies> - - <!-- other modules in this project --> - <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>todoapp-fixture</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-unittestsupport</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-integtestsupport</artifactId> - </dependency> - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-specsupport</artifactId> - </dependency> - - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-wrapper</artifactId> - </dependency> - <dependency> - <groupId>org.apache.isis.core</groupId> - <artifactId>isis-core-runtime</artifactId> - </dependency> - - <dependency> - <groupId>org.hsqldb</groupId> - <artifactId>hsqldb</artifactId> - </dependency> - - <!-- - uncomment to enable enhanced cucumber-jvm reporting - http://www.masterthought.net/section/cucumber-reporting - <dependency> - <groupId>com.googlecode.totallylazy</groupId> - <artifactId>totallylazy</artifactId> - <version>991</version> - </dependency> - - <dependency> - <groupId>net.masterthought</groupId> - <artifactId>cucumber-reporting</artifactId> - <version>0.0.21</version> - </dependency> - <dependency> - <groupId>net.masterthought</groupId> - <artifactId>maven-cucumber-reporting</artifactId> - <version>0.0.4</version> - </dependency> - --> - </dependencies> - - <!-- - uncomment for enhanced cucumber-jvm reporting - http://www.masterthought.net/section/cucumber-reporting - <repositories> - <repository> - <id>repo.bodar.com</id> - <url>http://repo.bodar.com</url> - </repository> - </repositories> - --> - - -</project> http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/src/test/java/integration/ToDoAppSystemInitializer.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/src/test/java/integration/ToDoAppSystemInitializer.java b/example/application/todoapp/integtests/src/test/java/integration/ToDoAppSystemInitializer.java deleted file mode 100644 index 3e21d50..0000000 --- a/example/application/todoapp/integtests/src/test/java/integration/ToDoAppSystemInitializer.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * 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 integration; - -import org.apache.isis.core.commons.config.IsisConfiguration; -import org.apache.isis.core.integtestsupport.IsisSystemForTest; -import org.apache.isis.core.runtime.persistence.PersistenceConstants; -import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller; -import org.apache.isis.objectstore.jdo.datanucleus.IsisConfigurationForJdoIntegTests; - -/** - * Holds an instance of an {@link IsisSystemForTest} as a {@link ThreadLocal} on the current thread, - * initialized with ToDo app's domain services. - */ -public class ToDoAppSystemInitializer { - - private ToDoAppSystemInitializer(){} - - public static IsisSystemForTest initIsft() { - IsisSystemForTest isft = IsisSystemForTest.getElseNull(); - if(isft == null) { - isft = new ToDoSystemBuilder().build().setUpSystem(); - IsisSystemForTest.set(isft); - } - return isft; - } - - private static class ToDoSystemBuilder extends IsisSystemForTest.Builder { - - public ToDoSystemBuilder() { - withLoggingAt(org.apache.log4j.Level.INFO); - with(testConfiguration()); - with(new DataNucleusPersistenceMechanismInstaller()); - - // services annotated with @DomainService - withServicesIn("app" - ,"dom.todo" - ,"fixture.todo" - ,"webapp.admin" - ,"webapp.prototyping" - ,"org.apache.isis.core.wrapper" - ,"org.apache.isis.applib" - ,"org.apache.isis.core.metamodel.services" - ,"org.apache.isis.core.runtime.services" - ,"org.apache.isis.objectstore.jdo.datanucleus.service.support" // IsisJdoSupportImpl - ,"org.apache.isis.objectstore.jdo.datanucleus.service.eventbus" // EventBusServiceJdo - ); - } - - private static IsisConfiguration testConfiguration() { - final IsisConfigurationForJdoIntegTests testConfiguration = new IsisConfigurationForJdoIntegTests(); - testConfiguration.addRegisterEntitiesPackagePrefix("dom"); - - // enable stricter checking - // - // the consequence of this is having to call 'nextTransaction()' between most of the given/when/then's - // because the command2 only ever refers to the event of the originating action. - testConfiguration.put(PersistenceConstants.ENFORCE_SAFE_SEMANTICS, "true"); - - return testConfiguration; - } - } -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/src/test/java/integration/glue/BootstrappingGlue.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/src/test/java/integration/glue/BootstrappingGlue.java b/example/application/todoapp/integtests/src/test/java/integration/glue/BootstrappingGlue.java deleted file mode 100644 index 9aae79c..0000000 --- a/example/application/todoapp/integtests/src/test/java/integration/glue/BootstrappingGlue.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * 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 integration.glue; - -import cucumber.api.java.After; -import cucumber.api.java.Before; -import integration.ToDoAppSystemInitializer; - -import org.apache.isis.core.specsupport.scenarios.ScenarioExecutionScope; -import org.apache.isis.core.specsupport.specs.CukeGlueAbstract; - -public class BootstrappingGlue extends CukeGlueAbstract { - - // ////////////////////////////////////// - - @Before(value={"@unit"}, order=100) - public void beforeScenarioUnitScope() { - before(ScenarioExecutionScope.UNIT); - } - - @Before(value={"@integration"}, order=100) - public void beforeScenarioIntegrationScope() { - org.apache.log4j.PropertyConfigurator.configure("logging.properties"); - ToDoAppSystemInitializer.initIsft(); - - before(ScenarioExecutionScope.INTEGRATION); - } - - @After - public void afterScenario(cucumber.api.Scenario sc) { - assertMocksSatisfied(); - after(sc); - } - - // ////////////////////////////////////// - - - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/src/test/java/integration/glue/CatalogOfFixturesGlue.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/src/test/java/integration/glue/CatalogOfFixturesGlue.java b/example/application/todoapp/integtests/src/test/java/integration/glue/CatalogOfFixturesGlue.java deleted file mode 100644 index 01e5776..0000000 --- a/example/application/todoapp/integtests/src/test/java/integration/glue/CatalogOfFixturesGlue.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * 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 integration.glue; - -import cucumber.api.java.Before; -import dom.todo.ToDoItem; -import fixture.todo.integtests.ToDoItemsIntegTestFixture; - -import org.apache.isis.core.specsupport.scenarios.InMemoryDB; -import org.apache.isis.core.specsupport.specs.CukeGlueAbstract; - -public class CatalogOfFixturesGlue extends CukeGlueAbstract { - - - @Before(value={"@unit", "@ToDoItemsFixture"}, order=20000) - public void unitFixtures() throws Throwable { - final InMemoryDB inMemoryDB = new InMemoryDBForToDoApp(this.scenarioExecution()); - inMemoryDB.getElseCreate(ToDoItem.class, "Write blog post"); - inMemoryDB.getElseCreate(ToDoItem.class, "Pick up bread"); - final ToDoItem t3 = inMemoryDB.getElseCreate(ToDoItem.class, "Pick up butter"); - t3.setComplete(true); - putVar("isis", "in-memory-db", inMemoryDB); - } - - // ////////////////////////////////////// - - @Before(value={"@integration", "@ToDoItemsFixture"}, order=20000) - public void integrationFixtures() throws Throwable { - scenarioExecution().install(new ToDoItemsIntegTestFixture()); - } - - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/integtests/src/test/java/integration/glue/InMemoryDBForToDoApp.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/integtests/src/test/java/integration/glue/InMemoryDBForToDoApp.java b/example/application/todoapp/integtests/src/test/java/integration/glue/InMemoryDBForToDoApp.java deleted file mode 100644 index 04dcfb6..0000000 --- a/example/application/todoapp/integtests/src/test/java/integration/glue/InMemoryDBForToDoApp.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * 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 integration.glue; - -import dom.todo.ToDoItem; - -import org.apache.isis.core.specsupport.scenarios.InMemoryDB; -import org.apache.isis.core.specsupport.scenarios.ScenarioExecution; - -public class InMemoryDBForToDoApp extends InMemoryDB { - - public InMemoryDBForToDoApp(ScenarioExecution scenarioExecution) { - super(scenarioExecution); - } - - /** - * Hook to initialize if possible. - */ - @Override - protected void init(Object obj, String str) { - if(obj instanceof ToDoItem) { - ToDoItem toDoItem = (ToDoItem) obj; - toDoItem.setDescription(str); - } - } -} \ No newline at end of file
