Repository: deltaspike Updated Branches: refs/heads/master 87eb87eca -> 8f394989d
DELTASPIKE-647 partial-bean scope tests Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8f394989 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8f394989 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8f394989 Branch: refs/heads/master Commit: 8f394989d1175b24f9f4fd7af98bcaba70d258b0 Parents: 87eb87e Author: gpetracek <[email protected]> Authored: Sat Jul 5 15:34:38 2014 +0200 Committer: gpetracek <[email protected]> Committed: Sat Jul 5 15:34:38 2014 +0200 ---------------------------------------------------------------------- .../uc004/ApplicationScopedPartialBean.java | 37 ++++++++++++++++++++ .../uc004/DependentScopedPartialBean.java | 34 ++++++++++++++++++ .../partialbean/uc004/PartialBeanWithScope.java | 37 -------------------- .../uc004/PartialBeanWithoutScope.java | 34 ------------------ .../uc004/ScopedPartialBeanTest.java | 12 +++---- 5 files changed, 77 insertions(+), 77 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8f394989/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ApplicationScopedPartialBean.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ApplicationScopedPartialBean.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ApplicationScopedPartialBean.java new file mode 100644 index 0000000..8400e23 --- /dev/null +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ApplicationScopedPartialBean.java @@ -0,0 +1,37 @@ +/* + * 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.deltaspike.test.core.api.partialbean.uc004; + +import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; + +import javax.enterprise.context.ApplicationScoped; + +@TestPartialBeanBinding +@ApplicationScoped +public abstract class ApplicationScopedPartialBean +{ + private int count; + + public abstract String getResult(); + + public int getManualResult() + { + return count++; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8f394989/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/DependentScopedPartialBean.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/DependentScopedPartialBean.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/DependentScopedPartialBean.java new file mode 100644 index 0000000..f4ab8e6 --- /dev/null +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/DependentScopedPartialBean.java @@ -0,0 +1,34 @@ +/* + * 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.deltaspike.test.core.api.partialbean.uc004; + +import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; + +@TestPartialBeanBinding +public abstract class DependentScopedPartialBean +{ + private int count; + + public abstract String getResult(); + + public int getManualResult() + { + return count++; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8f394989/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithScope.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithScope.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithScope.java deleted file mode 100644 index 7527ace..0000000 --- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithScope.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 org.apache.deltaspike.test.core.api.partialbean.uc004; - -import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; - -import javax.enterprise.context.ApplicationScoped; - -@TestPartialBeanBinding -@ApplicationScoped -public abstract class PartialBeanWithScope -{ - private int count; - - public abstract String getResult(); - - public int getManualResult() - { - return count++; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8f394989/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithoutScope.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithoutScope.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithoutScope.java deleted file mode 100644 index 4e1cd48..0000000 --- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/PartialBeanWithoutScope.java +++ /dev/null @@ -1,34 +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 org.apache.deltaspike.test.core.api.partialbean.uc004; - -import org.apache.deltaspike.test.core.api.partialbean.shared.TestPartialBeanBinding; - -@TestPartialBeanBinding -public abstract class PartialBeanWithoutScope -{ - private int count; - - public abstract String getResult(); - - public int getManualResult() - { - return count++; - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8f394989/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ScopedPartialBeanTest.java ---------------------------------------------------------------------- diff --git a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ScopedPartialBeanTest.java b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ScopedPartialBeanTest.java index 483c4fd..7045b71 100644 --- a/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ScopedPartialBeanTest.java +++ b/deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc004/ScopedPartialBeanTest.java @@ -67,28 +67,28 @@ public class ScopedPartialBeanTest @Test public void testPartialBeanWithApplicationScope() throws Exception { - String result = BeanProvider.getContextualReference(PartialBeanWithScope.class).getResult(); + String result = BeanProvider.getContextualReference(ApplicationScopedPartialBean.class).getResult(); Assert.assertEquals("partial-test-false", result); - int count = BeanProvider.getContextualReference(PartialBeanWithScope.class).getManualResult(); + int count = BeanProvider.getContextualReference(ApplicationScopedPartialBean.class).getManualResult(); Assert.assertEquals(0, count); - count = BeanProvider.getContextualReference(PartialBeanWithScope.class).getManualResult(); + count = BeanProvider.getContextualReference(ApplicationScopedPartialBean.class).getManualResult(); Assert.assertEquals(1, count); } @Test public void testPartialBeanWithDependentScope() throws Exception { - String result = BeanProvider.getContextualReference(PartialBeanWithoutScope.class).getResult(); + String result = BeanProvider.getContextualReference(DependentScopedPartialBean.class).getResult(); Assert.assertEquals("partial-test-false", result); - int count = BeanProvider.getContextualReference(PartialBeanWithoutScope.class).getManualResult(); + int count = BeanProvider.getContextualReference(DependentScopedPartialBean.class).getManualResult(); Assert.assertEquals(0, count); - count = BeanProvider.getContextualReference(PartialBeanWithoutScope.class).getManualResult(); + count = BeanProvider.getContextualReference(DependentScopedPartialBean.class).getManualResult(); Assert.assertEquals(0, count); } }
