Updated Branches: refs/heads/master 55f931ae1 -> da47b564a
http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java ---------------------------------------------------------------------- diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java new file mode 100644 index 0000000..a7dfd7e --- /dev/null +++ b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java @@ -0,0 +1,72 @@ +/* + * 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 org.apache.isis.core.integtestsupport.legacy.sample.fixtures; + +import org.apache.log4j.Logger; + +import org.apache.isis.applib.fixtures.AbstractFixture; +import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository; + +public class ProductsFixture extends AbstractFixture { + + // use ctrl+space to bring up the NO templates. + + // also, use CoffeeBytes code folding with + // user-defined regions of {{ and }} + + // {{ Logger + private final static Logger LOGGER = Logger.getLogger(ProductsFixture.class); + + public Logger getLOGGER() { + return LOGGER; + } + + // }} + + @Override + public void install() { + getLOGGER().debug("installing"); + getProductRepository().newProduct("355-40311", "Weekend camping pack", 5000); + getProductRepository().newProduct("850-18003", "Stripy Wasp Catcher", 695); + getProductRepository().newProduct("845-06203", "Combi Backpack Hamper", 5900); + getProductRepository().newProduct("820-72721", "Folding Table", 4000); + getProductRepository().newProduct("820-72725", "Folding Chair", 2500); + getProductRepository().newProduct("845-01020", "Isotherm Cool Box", 2500); + } + + // {{ Injected: ProductRepository + private ProductRepository productRepository; + + /** + * This field is not persisted, nor displayed to the user. + */ + protected ProductRepository getProductRepository() { + return this.productRepository; + } + + /** + * Injected by the application container. + */ + public void setProductRepository(final ProductRepository productRepository) { + this.productRepository = productRepository; + } + // }} + +} http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java ---------------------------------------------------------------------- diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java new file mode 100644 index 0000000..a1e2cea --- /dev/null +++ b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java @@ -0,0 +1,80 @@ +/* + * 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 org.apache.isis.core.integtestsupport.legacy.sample.service; + +import java.util.List; + +import org.apache.log4j.Logger; + +import org.apache.isis.applib.AbstractFactoryAndRepository; +import org.apache.isis.applib.annotation.Hidden; +import org.apache.isis.applib.annotation.Named; +import org.apache.isis.applib.filter.Filter; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country; + +@Named("Countries") +public class CountryRepository extends AbstractFactoryAndRepository { + + // {{ Logger + @SuppressWarnings("unused") + private final static Logger LOGGER = Logger.getLogger(CountryRepository.class); + + // }} + + /** + * Lists all countries in the repository. + */ + public List<Country> showAll() { + return allInstances(Country.class); + } + + // {{ findByCode + /** + * Returns the Country with given code + */ + public Country findByCode(@Named("Code") final String code) { + return firstMatch(Country.class, new Filter<Country>() { + @Override + public boolean accept(final Country country) { + return code.equals(country.getCode()); + } + }); + } + + // }} + + /** + * Creates a new countryGBR. + * + * <p> + * For use by fixtures only. + * + * @return + */ + @Hidden + public Country newCountry(final String code, final String name) { + final Country country = newTransientInstance(Country.class); + country.setCode(code); + country.setName(name); + persist(country); + return country; + } + +} http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java ---------------------------------------------------------------------- diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java new file mode 100644 index 0000000..45a9d99 --- /dev/null +++ b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java @@ -0,0 +1,116 @@ +/* + * 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 org.apache.isis.core.integtestsupport.legacy.sample.service; + +import java.util.List; + +import org.apache.log4j.Logger; + +import org.apache.isis.applib.AbstractFactoryAndRepository; +import org.apache.isis.applib.annotation.Hidden; +import org.apache.isis.applib.annotation.Named; +import org.apache.isis.applib.filter.Filter; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer; + +@Named("Customers") +public class CustomerRepository extends AbstractFactoryAndRepository { + + // use ctrl+space to bring up the NO templates. + + // also, use CoffeeBytes code folding with + // user-defined regions of {{ and }} + + // {{ Logger + @SuppressWarnings("unused") + private final static Logger LOGGER = Logger.getLogger(CustomerRepository.class); + + // }} + + /** + * Lists all customers in the repository. + */ + public List<Customer> showAll() { + return allInstances(Customer.class); + } + + // {{ findAllByName, findByName + /** + * Returns a list of Customers with given last name. + */ + public List<Customer> findAllByName(@Named("Last name") final String lastName) { + return allMatches(Customer.class, new FilterLastName(lastName)); + } + + /** + * Returns the first Customer with given last name. + */ + public Customer findByName(@Named("Last name") final String lastName) { + final Customer firstMatch = firstMatch(Customer.class, new FilterLastName(lastName)); + return firstMatch; + } + + private final class FilterLastName implements Filter<Customer> { + private final String name; + + private FilterLastName(final String name) { + this.name = name; + } + + @Override + public boolean accept(final Customer customer) { + return customer.getLastName().toLowerCase().contains(name.toLowerCase()); + } + } + + // }} + + /** + * Creates a new (still-transient) customer. + * + * @return + */ + public Customer newCustomer() { + final Customer customer = newTransientInstance(Customer.class); + return customer; + } + + /** + * Creates a new (already persisted) customer. + * + * <p> + * For use by fixtures only. + * + * @return + */ + @Hidden + public Customer newCustomer(final String firstName, final String lastName, final int customerNumber, final Country countryOfBirth) { + + final Customer customer = newCustomer(); + customer.setFirstName(firstName); + customer.setLastName(lastName); + customer.setCustomerNumber(customerNumber); + customer.modifyCountryOfBirth(countryOfBirth); + + persist(customer); + return customer; + } + +} http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java ---------------------------------------------------------------------- diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java new file mode 100644 index 0000000..228466a --- /dev/null +++ b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java @@ -0,0 +1,67 @@ +/* + * 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 org.apache.isis.core.integtestsupport.legacy.sample.service; + +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.apache.log4j.Logger; + +import org.apache.isis.applib.AbstractFactoryAndRepository; +import org.apache.isis.applib.annotation.Named; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order; + +@Named("Orders") +public class OrderRepository extends AbstractFactoryAndRepository { + + // use ctrl+space to bring up the NO templates. + + // also, use CoffeeBytes code folding with + // user-defined regions of {{ and }} + + @SuppressWarnings("unused") + private final static Logger LOGGER = Logger.getLogger(OrderRepository.class); + + // {{ findRecentOrders + public List<Order> findRecentOrders(final Customer customer, @Named("Number of Orders") final Integer numberOfOrders) { + final List<Order> orders = customer.getOrders(); + Collections.sort(orders, new Comparator<Order>() { + @Override + public int compare(final Order o1, final Order o2) { + final long time1 = o1.getOrderDate().getTime(); + final long time2 = o2.getOrderDate().getTime(); + return (int) (time2 - time1); + } + }); + if (orders.size() < numberOfOrders) { + return orders; + } else { + return orders.subList(0, numberOfOrders); + } + } + + public Integer default1FindRecentOrders() { + return 3; + } + // }} + +} http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java ---------------------------------------------------------------------- diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java new file mode 100644 index 0000000..d94aa6d --- /dev/null +++ b/core/integtestsupport/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java @@ -0,0 +1,103 @@ +/* + * 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 org.apache.isis.core.integtestsupport.legacy.sample.service; + +import java.util.List; + +import org.apache.log4j.Logger; + +import org.apache.isis.applib.AbstractFactoryAndRepository; +import org.apache.isis.applib.annotation.Hidden; +import org.apache.isis.applib.annotation.Named; +import org.apache.isis.applib.filter.Filter; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer; +import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product; + +@Named("Products") +public class ProductRepository extends AbstractFactoryAndRepository { + + // use ctrl+space to bring up the NO templates. + + // also, use CoffeeBytes code folding with + // user-defined regions of {{ and }} + + // {{ Logger + @SuppressWarnings("unused") + private final static Logger LOGGER = Logger.getLogger(ProductRepository.class); + + // }} + + /** + * Lists all products in the repository. + */ + public List<Product> showAll() { + return allInstances(Product.class); + } + + // {{ findByCode + /** + * Returns the Product with given code + */ + public Product findByCode(@Named("Code") final String code) { + return firstMatch(Product.class, new Filter<Product>() { + @Override + public boolean accept(final Product product) { + return code.equals(product.getCode()); + } + }); + } + + // }} + + /** + * Creates a new product. + * + * <p> + * For use by fixtures only. + * + * @return + */ + @Hidden + public Product newProduct(final String code, final String description, final int priceInPence) { + final Product product = newTransientInstance(Product.class); + product.setCode(code); + product.setDescription(description); + product.setPrice(new Double(priceInPence / 100)); + persist(product); + return product; + } + + /** + * Creates a new still transient product. + * + * <p> + * For use by tests only. Using this rather than {@link Customer} since + * {@link Product} has a {@link Product#validate()} method. + * + * @return + */ + @Hidden + public Product newProduct() { + return newTransientInstance(Product.class); + } + + + +} http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/core/pom.xml ---------------------------------------------------------------------- diff --git a/core/pom.xml b/core/pom.xml index 78e674c..b485938 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1346,7 +1346,7 @@ ${license.additional-notes} </exclusions> </dependency> - <!-- Testing libraries (not scope=test because used by isis-viewer-junit) --> + <!-- Testing libraries (not scope=test because used by isis-core-integtest) --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/claims/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/claims/pom.xml b/example/application/claims/pom.xml index 60110fb..6babb5e 100644 --- a/example/application/claims/pom.xml +++ b/example/application/claims/pom.xml @@ -32,7 +32,6 @@ <isis-security-file.version>1.0.1-SNAPSHOT</isis-security-file.version> <isis-viewer-dnd.version>1.0.0-SNAPSHOT</isis-viewer-dnd.version> <isis-viewer-wicket.version>1.2.0-SNAPSHOT</isis-viewer-wicket.version> - <isis-viewer-junit.version>1.0.0-SNAPSHOT</isis-viewer-junit.version> <isis-viewer-scimpi.version>1.0.0-SNAPSHOT</isis-viewer-scimpi.version> </properties> @@ -189,14 +188,6 @@ <dependency> <groupId>org.apache.isis.viewer</groupId> - <artifactId>isis-viewer-junit</artifactId> - <version>${isis-viewer-junit.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - <dependency> - <groupId>org.apache.isis.viewer</groupId> <artifactId>isis-viewer-scimpi</artifactId> <version>${isis-viewer-scimpi.version}</version> <type>pom</type> http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/claims/viewer-dnd/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/claims/viewer-dnd/pom.xml b/example/application/claims/viewer-dnd/pom.xml index bd80a69..033bcd4 100644 --- a/example/application/claims/viewer-dnd/pom.xml +++ b/example/application/claims/viewer-dnd/pom.xml @@ -76,7 +76,6 @@ <artifactId>isis-core-metamodel</artifactId> </dependency> - <!-- isis default runtime --> <dependency> <groupId>org.apache.isis.core</groupId> <artifactId>isis-core-webserver</artifactId> @@ -104,6 +103,17 @@ <dependency> <groupId>org.apache.isis.core</groupId> + <artifactId>isis-core-wrapper</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.isis.core</groupId> + <artifactId>isis-core-integtestsupport</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.isis.core</groupId> <artifactId>isis-core-security</artifactId> </dependency> @@ -113,12 +123,6 @@ <artifactId>isis-viewer-dnd-impl</artifactId> </dependency> - <!-- JUnit Viewer dependencies --> - <dependency> - <groupId>org.apache.isis.viewer</groupId> - <artifactId>isis-viewer-junit-impl</artifactId> - <scope>test</scope> - </dependency> </dependencies> http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/AbstractTest.java ---------------------------------------------------------------------- diff --git a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/AbstractTest.java b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/AbstractTest.java index a1c6d38..a22752d 100644 --- a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/AbstractTest.java +++ b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/AbstractTest.java @@ -26,13 +26,13 @@ import org.junit.runner.RunWith; import org.apache.isis.applib.DomainObjectContainer; import org.apache.isis.applib.services.wrapper.WrapperFactory; import org.apache.isis.applib.services.wrapper.WrapperObject; +import org.apache.isis.core.integtestsupport.legacy.IsisTestRunner; +import org.apache.isis.core.integtestsupport.legacy.Service; +import org.apache.isis.core.integtestsupport.legacy.Services; import org.apache.isis.core.wrapper.WrapperFactoryDefault; import org.apache.isis.example.application.claims.dom.claim.ClaimRepository; import org.apache.isis.example.application.claims.dom.employee.Employee; import org.apache.isis.example.application.claims.dom.employee.EmployeeRepository; -import org.apache.isis.viewer.junit.IsisTestRunner; -import org.apache.isis.viewer.junit.Service; -import org.apache.isis.viewer.junit.Services; @RunWith(IsisTestRunner.class) @Services({ @Service(ClaimRepository.class), @Service(EmployeeRepository.class), @Service(WrapperFactoryDefault.class) }) http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/ClaimSubmitTest.java ---------------------------------------------------------------------- diff --git a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/ClaimSubmitTest.java b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/ClaimSubmitTest.java index d81b0d1..b72af1c 100644 --- a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/ClaimSubmitTest.java +++ b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/ClaimSubmitTest.java @@ -28,11 +28,11 @@ import java.util.List; import org.junit.Test; import org.apache.isis.applib.services.wrapper.DisabledException; +import org.apache.isis.core.integtestsupport.legacy.Fixture; +import org.apache.isis.core.integtestsupport.legacy.Fixtures; import org.apache.isis.example.application.claims.dom.claim.Approver; import org.apache.isis.example.application.claims.dom.claim.Claim; import org.apache.isis.example.application.claims.fixture.ClaimsFixture; -import org.apache.isis.viewer.junit.Fixture; -import org.apache.isis.viewer.junit.Fixtures; @Fixtures({ @Fixture(ClaimsFixture.class) }) public class ClaimSubmitTest extends AbstractTest { http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/NewClaimTest.java ---------------------------------------------------------------------- diff --git a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/NewClaimTest.java b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/NewClaimTest.java index 5dc9bf4..4e05c80 100644 --- a/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/NewClaimTest.java +++ b/example/application/claims/viewer-dnd/src/test/java/org/apache/isis/example/claims/junit/NewClaimTest.java @@ -24,10 +24,10 @@ import static org.junit.Assert.assertThat; import org.junit.Test; +import org.apache.isis.core.integtestsupport.legacy.Fixture; +import org.apache.isis.core.integtestsupport.legacy.Fixtures; import org.apache.isis.example.application.claims.dom.claim.Claim; import org.apache.isis.example.application.claims.fixture.ClaimsFixture; -import org.apache.isis.viewer.junit.Fixture; -import org.apache.isis.viewer.junit.Fixtures; @Fixtures({ @Fixture(ClaimsFixture.class) }) public class NewClaimTest extends AbstractTest { http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/quickstart_dnd_junit_bdd/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/quickstart_dnd_junit_bdd/pom.xml b/example/application/quickstart_dnd_junit_bdd/pom.xml index 4596c2e..4907d38 100644 --- a/example/application/quickstart_dnd_junit_bdd/pom.xml +++ b/example/application/quickstart_dnd_junit_bdd/pom.xml @@ -39,7 +39,6 @@ <isis-profilestore-xml.version>1.0.0-SNAPSHOT</isis-profilestore-xml.version> <isis-viewer-bdd.version>1.0.0-SNAPSHOT</isis-viewer-bdd.version> <isis-viewer-dnd.version>1.0.0-SNAPSHOT</isis-viewer-dnd.version> - <isis-viewer-junit.version>1.0.0-SNAPSHOT</isis-viewer-junit.version> <isis-security-file.version>1.0.1-SNAPSHOT</isis-security-file.version> </properties> @@ -192,14 +191,6 @@ <dependency> <groupId>org.apache.isis.viewer</groupId> - <artifactId>isis-viewer-junit</artifactId> - <version>${isis-viewer-junit.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - <dependency> - <groupId>org.apache.isis.viewer</groupId> <artifactId>isis-viewer-bdd</artifactId> <version>${isis-viewer-bdd.version}</version> <type>pom</type> http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/quickstart_dnd_junit_bdd/tests-junit/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/quickstart_dnd_junit_bdd/tests-junit/pom.xml b/example/application/quickstart_dnd_junit_bdd/tests-junit/pom.xml index ca022bc..90c220c 100644 --- a/example/application/quickstart_dnd_junit_bdd/tests-junit/pom.xml +++ b/example/application/quickstart_dnd_junit_bdd/tests-junit/pom.xml @@ -65,10 +65,15 @@ <artifactId>isis-security-file</artifactId> </dependency> - <!-- isis viewers --> + <!-- isis testing --> <dependency> - <groupId>org.apache.isis.viewer</groupId> - <artifactId>isis-viewer-junit-impl</artifactId> + <groupId>org.apache.isis.core</groupId> + <artifactId>isis-core-wrapper</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.isis.core</groupId> + <artifactId>isis-core-integtestsupport</artifactId> <scope>test</scope> </dependency> http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/AbstractTest.java ---------------------------------------------------------------------- diff --git a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/AbstractTest.java b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/AbstractTest.java index e3ab772..2a29b1f 100644 --- a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/AbstractTest.java +++ b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/AbstractTest.java @@ -28,11 +28,11 @@ import org.junit.runner.RunWith; import org.apache.isis.applib.DomainObjectContainer; import org.apache.isis.applib.services.wrapper.WrapperFactory; import org.apache.isis.applib.services.wrapper.WrapperObject; +import org.apache.isis.core.integtestsupport.legacy.ConfigDir; +import org.apache.isis.core.integtestsupport.legacy.IsisTestRunner; +import org.apache.isis.core.integtestsupport.legacy.Service; +import org.apache.isis.core.integtestsupport.legacy.Services; import org.apache.isis.core.wrapper.WrapperFactoryDefault; -import org.apache.isis.viewer.junit.ConfigDir; -import org.apache.isis.viewer.junit.IsisTestRunner; -import org.apache.isis.viewer.junit.Service; -import org.apache.isis.viewer.junit.Services; @RunWith(IsisTestRunner.class) @ConfigDir("../viewer-dnd/config") // acts as default, but can be overridden by annotations http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java ---------------------------------------------------------------------- diff --git a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java index c163622..a0b25fd 100644 --- a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java +++ b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java @@ -34,8 +34,8 @@ import fixture.todo.ToDoItemsFixture; import org.junit.Test; -import org.apache.isis.viewer.junit.Fixture; -import org.apache.isis.viewer.junit.Fixtures; +import org.apache.isis.core.integtestsupport.legacy.Fixture; +import org.apache.isis.core.integtestsupport.legacy.Fixtures; @Fixtures({ @Fixture(ToDoItemsFixture.class), @Fixture(LogonAsSvenFixture.class) }) public class ToDoItemRepositoryTest extends AbstractTest { http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemTest.java ---------------------------------------------------------------------- diff --git a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemTest.java b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemTest.java index f299b32..72ad8d3 100644 --- a/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemTest.java +++ b/example/application/quickstart_dnd_junit_bdd/tests-junit/src/test/java/junit/todo/ToDoItemTest.java @@ -31,8 +31,8 @@ import org.junit.Before; import org.junit.Test; import org.apache.isis.applib.services.wrapper.DisabledException; -import org.apache.isis.viewer.junit.Fixture; -import org.apache.isis.viewer.junit.Fixtures; +import org.apache.isis.core.integtestsupport.legacy.Fixture; +import org.apache.isis.core.integtestsupport.legacy.Fixtures; @Fixtures({ @Fixture(ToDoItemsFixture.class), @Fixture(LogonAsSvenFixture.class) }) public class ToDoItemTest extends AbstractTest { http://git-wip-us.apache.org/repos/asf/isis/blob/da47b564/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index f2f0b21..48cfce0 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,6 @@ <module>component/viewer/wicket</module> <module>component/viewer/restfulobjects</module> <module>component/viewer/bdd</module> - <module>component/viewer/junit</module> <module>example/application/claims</module> <module>example/application/quickstart_scimpi_nosql</module>
