Repository: zest-java Updated Branches: refs/heads/ZEST-132 4dabe5781 -> d845ea705
Testcase use the old style composition with explicit Entities. Not necessary anymore. Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/d845ea70 Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/d845ea70 Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/d845ea70 Branch: refs/heads/ZEST-132 Commit: d845ea705b05b3d8182086ba82979fa8332bde78 Parents: 4dabe57 Author: Niclas Hedhman <[email protected]> Authored: Mon Dec 14 18:21:49 2015 +0800 Committer: Niclas Hedhman <[email protected]> Committed: Mon Dec 14 18:21:49 2015 +0800 ---------------------------------------------------------------------- .../test/indexing/AbstractAnyQueryTest.java | 24 +++++++-------- .../org/apache/zest/test/indexing/TestData.java | 11 +++---- .../indexing/model/entities/AccountEntity.java | 29 ------------------ .../test/indexing/model/entities/CatEntity.java | 31 -------------------- .../indexing/model/entities/CityEntity.java | 29 ------------------ .../test/indexing/model/entities/DogEntity.java | 29 ------------------ .../indexing/model/entities/DomainEntity.java | 29 ------------------ .../indexing/model/entities/FemaleEntity.java | 29 ------------------ .../indexing/model/entities/MaleEntity.java | 29 ------------------ .../indexing/model/entities/PersonEntity.java | 29 ------------------ .../test/indexing/model/entities/PetEntity.java | 29 ------------------ .../test/indexing/model/entities/package.html | 21 ------------- 12 files changed, 16 insertions(+), 303 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java index 9c34fb8..de7676e 100755 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/AbstractAnyQueryTest.java @@ -23,19 +23,19 @@ import org.apache.zest.bootstrap.AssemblyException; import org.apache.zest.bootstrap.ModuleAssembly; import org.apache.zest.test.AbstractZestTest; import org.apache.zest.test.EntityTestAssembler; +import org.apache.zest.test.indexing.model.Account; import org.apache.zest.test.indexing.model.Address; +import org.apache.zest.test.indexing.model.Cat; +import org.apache.zest.test.indexing.model.City; +import org.apache.zest.test.indexing.model.Domain; +import org.apache.zest.test.indexing.model.Female; import org.apache.zest.test.indexing.model.File; import org.apache.zest.test.indexing.model.Host; +import org.apache.zest.test.indexing.model.Male; import org.apache.zest.test.indexing.model.Port; import org.apache.zest.test.indexing.model.Protocol; import org.apache.zest.test.indexing.model.QueryParam; import org.apache.zest.test.indexing.model.URL; -import org.apache.zest.test.indexing.model.entities.AccountEntity; -import org.apache.zest.test.indexing.model.entities.CatEntity; -import org.apache.zest.test.indexing.model.entities.CityEntity; -import org.apache.zest.test.indexing.model.entities.DomainEntity; -import org.apache.zest.test.indexing.model.entities.FemaleEntity; -import org.apache.zest.test.indexing.model.entities.MaleEntity; /** * Abstract satisfiedBy with tests for any queries against Index/Query engines. @@ -56,12 +56,12 @@ public class AbstractAnyQueryTest protected void assembleEntities( ModuleAssembly module, Visibility visibility ) { - module.entities( MaleEntity.class, - FemaleEntity.class, - CityEntity.class, - DomainEntity.class, - AccountEntity.class, - CatEntity.class ). visibleIn( visibility ); + module.entities( Male.class, + Female.class, + City.class, + Domain.class, + Account.class, + Cat.class ). visibleIn( visibility ); } protected void assembleValues( ModuleAssembly module, Visibility visibility ) http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/TestData.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/TestData.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/TestData.java index d9988d0..e83b71b 100644 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/TestData.java +++ b/core/testsupport/src/main/java/org/apache/zest/test/indexing/TestData.java @@ -41,9 +41,6 @@ import org.apache.zest.test.indexing.model.Person; import org.apache.zest.test.indexing.model.Protocol; import org.apache.zest.test.indexing.model.QueryParam; import org.apache.zest.test.indexing.model.URL; -import org.apache.zest.test.indexing.model.entities.CatEntity; -import org.apache.zest.test.indexing.model.entities.FemaleEntity; -import org.apache.zest.test.indexing.model.entities.MaleEntity; import static org.joda.time.DateTimeZone.UTC; @@ -144,7 +141,7 @@ class TestData Female annDoe; { - EntityBuilder<FemaleEntity> femaleBuilder = unitOfWork.newEntityBuilder( FemaleEntity.class, "anndoe" ); + EntityBuilder<Female> femaleBuilder = unitOfWork.newEntityBuilder( Female.class, "anndoe" ); annDoe = femaleBuilder.instance(); annDoe.name().set( "Ann Doe" ); annDoe.title().set( Person.Title.MRS ); @@ -161,7 +158,7 @@ class TestData } { - EntityBuilder<MaleEntity> maleBuilder = unitOfWork.newEntityBuilder( MaleEntity.class ); + EntityBuilder<Male> maleBuilder = unitOfWork.newEntityBuilder( Male.class ); Male joeDoe = maleBuilder.instance(); joeDoe.name().set( "Joe Doe" ); joeDoe.title().set( Person.Title.MR ); @@ -186,7 +183,7 @@ class TestData } { - EntityBuilder<MaleEntity> maleBuilder = unitOfWork.newEntityBuilder( MaleEntity.class ); + EntityBuilder<Male> maleBuilder = unitOfWork.newEntityBuilder( Male.class ); Male jackDoe = maleBuilder.instance(); jackDoe.name().set( "Jack Doe" ); jackDoe.title().set( Person.Title.DR ); @@ -237,7 +234,7 @@ class TestData } { - EntityBuilder<CatEntity> catBuilder = unitOfWork.newEntityBuilder( CatEntity.class ); + EntityBuilder<Cat> catBuilder = unitOfWork.newEntityBuilder( Cat.class ); Cat felix = catBuilder.instance(); felix.name().set( "Felix" ); catBuilder.newInstance(); http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/AccountEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/AccountEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/AccountEntity.java deleted file mode 100644 index 0c2ac1d..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/AccountEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Account; - -/** - * JAVADOC Add JavaDoc - */ -public interface AccountEntity - extends Account, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CatEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CatEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CatEntity.java deleted file mode 100644 index 39cf47e..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CatEntity.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.api.entity.Queryable; -import org.apache.zest.test.indexing.model.Cat; - -/** - * JAVADOC Add JavaDoc - */ -@Queryable( false ) -public interface CatEntity - extends Cat, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CityEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CityEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CityEntity.java deleted file mode 100644 index 16a49dc..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/CityEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.City; - -/** - * JAVADOC Add JavaDoc - */ -public interface CityEntity - extends City, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DogEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DogEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DogEntity.java deleted file mode 100644 index 900b537..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DogEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Dog; - -/** - * JAVADOC Add JavaDoc - */ -public interface DogEntity - extends Dog, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DomainEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DomainEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DomainEntity.java deleted file mode 100644 index 06482ec..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/DomainEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Domain; - -/** - * JAVADOC Add JavaDoc - */ -public interface DomainEntity - extends Domain, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/FemaleEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/FemaleEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/FemaleEntity.java deleted file mode 100644 index 24b5e4b..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/FemaleEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Female; - -/** - * JAVADOC Add JavaDoc - */ -public interface FemaleEntity - extends Female, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/MaleEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/MaleEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/MaleEntity.java deleted file mode 100644 index 0b6675e..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/MaleEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Male; - -/** - * JAVADOC Add JavaDoc - */ -public interface MaleEntity - extends Male, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PersonEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PersonEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PersonEntity.java deleted file mode 100644 index 02da77e..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PersonEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Person; - -/** - * JAVADOC Add JavaDoc - */ -public interface PersonEntity - extends Person, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PetEntity.java ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PetEntity.java b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PetEntity.java deleted file mode 100644 index cc6f921..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/PetEntity.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2008 Alin Dreghiciu. - * - * 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.apache.zest.test.indexing.model.entities; - -import org.apache.zest.api.entity.EntityComposite; -import org.apache.zest.test.indexing.model.Pet; - -/** - * JAVADOC Add JavaDoc - */ -public interface PetEntity - extends Pet, EntityComposite -{ -} http://git-wip-us.apache.org/repos/asf/zest-java/blob/d845ea70/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/package.html ---------------------------------------------------------------------- diff --git a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/package.html b/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/package.html deleted file mode 100644 index b19cc59..0000000 --- a/core/testsupport/src/main/java/org/apache/zest/test/indexing/model/entities/package.html +++ /dev/null @@ -1,21 +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. ---> -<html> - <body> - <h2>Index/Query SPI Test Support - Entities.</h2> - </body> -</html>
