diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/AbstractPersistentEntity.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/AbstractPersistentEntity.java similarity index 96% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/AbstractPersistentEntity.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/AbstractPersistentEntity.java index 0bb0f21f0..25a786161 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/AbstractPersistentEntity.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/AbstractPersistentEntity.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import org.springframework.data.annotation.Id; diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Address.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Address.java similarity index 96% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Address.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Address.java index ce09eeffe..cf400153e 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Address.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Address.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import org.springframework.util.Assert; diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Customer.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Customer.java similarity index 98% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Customer.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Customer.java index a111b7a6a..d5aec3b0b 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Customer.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Customer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import java.util.Collections; import java.util.HashSet; diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/CustomerRepository.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/CustomerRepository.java similarity index 91% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/CustomerRepository.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/CustomerRepository.java index be0456306..894b1cd2b 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/CustomerRepository.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/CustomerRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import java.util.List; @@ -26,7 +26,6 @@ import org.springframework.data.repository.query.Param; * @author Oliver Gierke * @author David Turanski */ - public interface CustomerRepository extends CrudRepository { /** @@ -44,5 +43,4 @@ public interface CustomerRepository extends CrudRepository { * @return */ Customer findByEmailAddress(@Param("email") EmailAddress emailAddress); - } diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/EmailAddress.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/EmailAddress.java similarity index 98% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/EmailAddress.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/EmailAddress.java index 91bb4222a..0b81621bc 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/EmailAddress.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/EmailAddress.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import java.util.regex.Pattern; diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/GemfireWebTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/GemfireWebTests.java new file mode 100644 index 000000000..a92aef524 --- /dev/null +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/GemfireWebTests.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013 the original author or authors. + * + * Licensed 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.springframework.data.rest.webmvc.gemfire; + +import java.util.Arrays; + +import org.springframework.data.rest.webmvc.AbstractWebIntegrationTests; +import org.springframework.test.context.ContextConfiguration; + +/** + * @author Oliver Gierke + */ +@ContextConfiguration(classes = GemfireRepositoryConfig.class) +public class GemfireWebTests extends AbstractWebIntegrationTests { + + /* + * (non-Javadoc) + * @see org.springframework.data.rest.webmvc.AbstractWebIntegrationTests#expectedRootLinkRels() + */ + @Override + protected Iterable expectedRootLinkRels() { + return Arrays.asList("products"); + } +} diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/LineItem.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/LineItem.java similarity index 94% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/LineItem.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/LineItem.java index a78a66499..d6371353d 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/LineItem.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/LineItem.java @@ -13,11 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.order; +package org.springframework.data.rest.webmvc.gemfire; import java.math.BigDecimal; -import org.springframework.data.rest.webmvc.gemfire.core.Product; import org.springframework.util.Assert; /** diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/Order.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Order.java similarity index 89% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/Order.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Order.java index c8677b2ae..5906a72fa 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/Order.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Order.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.order; +package org.springframework.data.rest.webmvc.gemfire; import java.math.BigDecimal; import java.util.Collections; @@ -21,8 +21,6 @@ import java.util.HashSet; import java.util.Set; import org.springframework.data.gemfire.mapping.Region; -import org.springframework.data.rest.webmvc.gemfire.core.AbstractPersistentEntity; -import org.springframework.data.rest.webmvc.gemfire.core.Address; import org.springframework.util.Assert; /** @@ -38,7 +36,7 @@ public class Order extends AbstractPersistentEntity { private Set lineItems = new HashSet(); /** - * Creates a new {@link Order} for the given {@link org.springframework.data.rest.webmvc.gemfire.core.Customer}. + * Creates a new {@link Order} for the given {@link org.springframework.data.rest.webmvc.gemfire.Customer}. * * @param id order ID * @param customerId must not be {@literal null}. @@ -65,7 +63,7 @@ public class Order extends AbstractPersistentEntity { } /** - * Returns the id of the {@link org.springframework.data.rest.webmvc.gemfire.core.Customer} who placed the + * Returns the id of the {@link org.springframework.data.rest.webmvc.gemfire.Customer} who placed the * {@link Order}. * * @return diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/OrderRepository.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/OrderRepository.java similarity index 93% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/OrderRepository.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/OrderRepository.java index 9360673f7..36bedfd4d 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/order/OrderRepository.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/OrderRepository.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.order; +package org.springframework.data.rest.webmvc.gemfire; import java.util.List; @@ -24,5 +24,6 @@ import org.springframework.data.repository.CrudRepository; * @author David Turanski */ public interface OrderRepository extends CrudRepository { + List findByCustomerId(Long customerId); } diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Product.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Product.java similarity index 98% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Product.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Product.java index 72f805f7c..9eab50c15 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/Product.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/Product.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import java.math.BigDecimal; import java.util.Collections; diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/ProductRepository.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/ProductRepository.java similarity index 90% rename from spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/ProductRepository.java rename to spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/ProductRepository.java index b1e19a721..86d2d7a1f 100644 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/core/ProductRepository.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/gemfire/ProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 the original author or authors. + * Copyright 2012-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.data.rest.webmvc.gemfire.core; +package org.springframework.data.rest.webmvc.gemfire; import java.util.List; @@ -24,7 +24,7 @@ import org.springframework.data.repository.CrudRepository; * Repository interface to access {@link Product}s. * * @author Oliver Gierke - * @author David TuranskiGem + * @author David Turanski */ public interface ProductRepository extends CrudRepository { @@ -34,7 +34,6 @@ public interface ProductRepository extends CrudRepository { * @param the search string * @return */ - List findByDescriptionContaining(String description); /**