You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pe...@apache.org on 2024/12/04 22:39:09 UTC
(wicket) 03/04: WICKET-7125 remove unused test code
This is an automated email from the ASF dual-hosted git repository.
pedro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 98d0a25d64918c6e62836d2e3906574d542ab5de
Author: Pedro Santos <pe...@apache.org>
AuthorDate: Mon Nov 4 15:54:13 2024 -0300
WICKET-7125 remove unused test code
---
.../org/apache/wicket/cdi/CdiWicketTester.java | 18 --------
.../org/apache/wicket/cdi/WicketCdiTestCase.java | 4 +-
.../apache/wicket/cdi/testapp/TestApplication.java | 39 ----------------
.../wicket/cdi/testapp/TestCdiApplication.java | 54 ----------------------
4 files changed, 1 insertion(+), 114 deletions(-)
diff --git a/wicket-cdi/src/test/java/org/apache/wicket/cdi/CdiWicketTester.java b/wicket-cdi/src/test/java/org/apache/wicket/cdi/CdiWicketTester.java
index 1547b00bc2..dad2c3a025 100644
--- a/wicket-cdi/src/test/java/org/apache/wicket/cdi/CdiWicketTester.java
+++ b/wicket-cdi/src/test/java/org/apache/wicket/cdi/CdiWicketTester.java
@@ -94,24 +94,6 @@ public class CdiWicketTester extends WicketTester
return ret;
}
- @PreDestroy
- public void finish()
- {
- try
- {
- logger.debug("Destroying Cdi Wicket Tester");
- if (getLastRequest() != null)
- {
- contextManager.deactivateContexts();
- }
- contextManager.destroy();
- destroy();
- }
- catch (Throwable t)
- {
- }
- }
-
/**
* Asserts that the response contains the right count. This can only be done by parsing the
* markup because models only contain valid values during a request, not after.
diff --git a/wicket-cdi/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java b/wicket-cdi/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
index a2d9c8df37..fb7829efcc 100644
--- a/wicket-cdi/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
+++ b/wicket-cdi/src/test/java/org/apache/wicket/cdi/WicketCdiTestCase.java
@@ -21,7 +21,6 @@ import org.apache.wicket.Page;
import org.apache.wicket.ThreadContext;
import org.apache.wicket.behavior.AbstractAjaxBehavior;
import org.apache.wicket.cdi.testapp.TestAppScope;
-import org.apache.wicket.cdi.testapp.TestCdiApplication;
import org.apache.wicket.cdi.testapp.TestConversationBean;
import org.apache.wicket.mock.MockApplication;
import org.apache.wicket.protocol.http.WebApplication;
@@ -42,8 +41,7 @@ import jakarta.inject.Inject;
@AdditionalClasses({ CdiWicketTester.class, BehaviorInjector.class, CdiConfiguration.class,
CdiShutdownCleaner.class, ComponentInjector.class, ConversationExpiryChecker.class,
ConversationPropagator.class, DetachEventEmitter.class, SessionInjector.class,
- TestAppScope.class, TestConversationBean.class, TestCdiApplication.class,
- AutoConversation.class })
+ TestAppScope.class, TestConversationBean.class, AutoConversation.class })
public abstract class WicketCdiTestCase
{
@Inject
diff --git a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestApplication.java b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestApplication.java
deleted file mode 100644
index 7b82203a3b..0000000000
--- a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestApplication.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 org.apache.wicket.cdi.testapp;
-
-import org.apache.wicket.Page;
-import org.apache.wicket.protocol.http.WebApplication;
-
-/**
- * @author jsarman
- */
-public class TestApplication extends WebApplication
-{
-
- @Override
- public Class<? extends Page> getHomePage()
- {
- return TestPage.class;
- }
-
- @Override
- protected void init()
- {
- super.init();
- }
-}
diff --git a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestCdiApplication.java b/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestCdiApplication.java
deleted file mode 100644
index 95d70bbd7d..0000000000
--- a/wicket-cdi/src/test/java/org/apache/wicket/cdi/testapp/TestCdiApplication.java
+++ /dev/null
@@ -1,54 +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.wicket.cdi.testapp;
-
-import jakarta.inject.Inject;
-
-import org.apache.wicket.Page;
-import org.apache.wicket.cdi.CdiConfiguration;
-import org.apache.wicket.protocol.http.WebApplication;
-
-/**
- * @author jsarman
- */
-public class TestCdiApplication extends WebApplication
-{
-
- @Inject
- @TestQualifier
- String testString;
-
-
- @Override
- public Class<? extends Page> getHomePage()
- {
- return TestPage.class;
- }
-
- @Override
- protected void init()
- {
- super.init();
- new CdiConfiguration().configure(this);
- }
-
- public String getInjectedTestString()
- {
- return testString;
- }
-
-}