// Path: centrepoint/modules/maven-importer/src/main/java/com/effectivemaven/centrepoint/maven/repository/RepositoryService.java
// @ImplementedBy( CentralRepositoryService.class )
// public interface RepositoryService
// {
//     /**
//      * Get the available versions for a given artifact by querying the repository metadata.
//      * The versions should be returned in sorted order from oldest to newest.
//      * 
//      * @param groupId the group ID of the artifact to query
//      * @param artifactId the artifact ID of the artifact to query
//      * @return versions available in the repository
//      * @throws RepositoryException
//      */
//     List<String> getAvailableVersions( String groupId, String artifactId )
//         throws RepositoryException;
// 
//     /**
//      * Retrieve a project from the repository and convert it to a basic Centrepoint project model.
//      * 
//      * @param groupId the Maven group ID to lookup
//      * @param artifactId the Maven artifact ID to lookup
//      * @param version the Maven artifact version to lookup
//      * @return the project created
//      * @throws RepositoryException
//      */
//     Project retrieveProject( String groupId, String artifactId, String version )
//         throws RepositoryException;
// }
// 
// Path: centrepoint/modules/model/src/main/java/com/effectivemaven/centrepoint/model/plugin/PluginManager.java
// public interface PluginManager
// {
//     /**
//      * Retrieve all plugins available (whether they are configurable or not).
//      * 
//      * @return the list of plugins
//      */
//     Collection<PanelPlugin> getPlugins();
// 
//     /**
//      * Retrieve all plugins available that take configuration options.
//      * 
//      * @return the list of configurable plugins
//      */
//     Collection<ConfigurablePanel<? extends ExtensionModel>> getConfigurablePlugins();
// 
//     /**
//      * Retrieve a specific configurable plugin, based on the ID of the configuration model.
//      * 
//      * @param id the ID of the plugin's configuration model, which should match the value of
//      *            {@link ConfigurablePanel#getId()}
//      * @return the plugin, or <tt>null</tt> if not found
//      */
//     ConfigurablePanel<? extends ExtensionModel> getConfigurablePlugin( String id );
// }
// 
// Path: centrepoint/modules/store-api/src/main/java/com/effectivemaven/centrepoint/store/ProjectStore.java
// public interface ProjectStore
// {
//     /**
//      * Retrieve all projects in their entirety.
//      * @return the project list
//      */
//     Collection<Project> getAllProjects();
// 
//     /**
//      * Retrieve a specific project.
//      * @param id the identifier of the project to retrieve
//      * @return the project, or <code>null</code> if not found
//      */
//     Project getProjectById( String id );
// 
//     /**
//      * Store the project. 
//      * @param project the project to store
//      */
//     void store( Project project );
// }


import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.google.inject.name.Names;
import java.net.URL;
import java.net.URLClassLoader;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.util.tester.WicketTester;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import com.effectivemaven.centrepoint.maven.repository.RepositoryService;
import com.effectivemaven.centrepoint.model.Project;
import com.effectivemaven.centrepoint.model.plugin.PluginManager;
import com.effectivemaven.centrepoint.store.MemoryProjectStore;
import com.effectivemaven.centrepoint.store.ProjectStore;
package com.effectivemaven.centrepoint.web;

/**
 * Copyright 2009
 *
 * 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. 
 */




public abstract class AbstractPageWithStoreTest
{
    static class PageWithStoreModule
        extends AbstractModule
    {
        @Override
        protected void configure()
        {
// Path: centrepoint/modules/maven-importer/src/main/java/com/effectivemaven/centrepoint/maven/repository/RepositoryService.java
// @ImplementedBy( CentralRepositoryService.class )
// public interface RepositoryService
// {
//     /**
//      * Get the available versions for a given artifact by querying the repository metadata.
//      * The versions should be returned in sorted order from oldest to newest.
//      * 
//      * @param groupId the group ID of the artifact to query
//      * @param artifactId the artifact ID of the artifact to query
//      * @return versions available in the repository
//      * @throws RepositoryException
//      */
//     List<String> getAvailableVersions( String groupId, String artifactId )
//         throws RepositoryException;
// 
//     /**
//      * Retrieve a project from the repository and convert it to a basic Centrepoint project model.
//      * 
//      * @param groupId the Maven group ID to lookup
//      * @param artifactId the Maven artifact ID to lookup
//      * @param version the Maven artifact version to lookup
//      * @return the project created
//      * @throws RepositoryException
//      */
//     Project retrieveProject( String groupId, String artifactId, String version )
//         throws RepositoryException;
// }
// 
// Path: centrepoint/modules/model/src/main/java/com/effectivemaven/centrepoint/model/plugin/PluginManager.java
// public interface PluginManager
// {
//     /**
//      * Retrieve all plugins available (whether they are configurable or not).
//      * 
//      * @return the list of plugins
//      */
//     Collection<PanelPlugin> getPlugins();
// 
//     /**
//      * Retrieve all plugins available that take configuration options.
//      * 
//      * @return the list of configurable plugins
//      */
//     Collection<ConfigurablePanel<? extends ExtensionModel>> getConfigurablePlugins();
// 
//     /**
//      * Retrieve a specific configurable plugin, based on the ID of the configuration model.
//      * 
//      * @param id the ID of the plugin's configuration model, which should match the value of
//      *            {@link ConfigurablePanel#getId()}
//      * @return the plugin, or <tt>null</tt> if not found
//      */
//     ConfigurablePanel<? extends ExtensionModel> getConfigurablePlugin( String id );
// }
// 
// Path: centrepoint/modules/store-api/src/main/java/com/effectivemaven/centrepoint/store/ProjectStore.java
// public interface ProjectStore
// {
//     /**
//      * Retrieve all projects in their entirety.
//      * @return the project list
//      */
//     Collection<Project> getAllProjects();
// 
//     /**
//      * Retrieve a specific project.
//      * @param id the identifier of the project to retrieve
//      * @return the project, or <code>null</code> if not found
//      */
//     Project getProjectById( String id );
// 
//     /**
//      * Store the project. 
//      * @param project the project to store
//      */
//     void store( Project project );
// }


// Path: centrepoint/modules/webapp/src/test/java/com/effectivemaven/centrepoint/web/AbstractPageWithStoreTest.java
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.google.inject.name.Names;
import java.net.URL;
import java.net.URLClassLoader;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.util.tester.WicketTester;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import com.effectivemaven.centrepoint.maven.repository.RepositoryService;
import com.effectivemaven.centrepoint.model.Project;
import com.effectivemaven.centrepoint.model.plugin.PluginManager;
import com.effectivemaven.centrepoint.store.MemoryProjectStore;
import com.effectivemaven.centrepoint.store.ProjectStore;

package com.effectivemaven.centrepoint.web;

/**
 * Copyright 2009
 *
 * 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. 
 */




public abstract class AbstractPageWithStoreTest
{
    static class PageWithStoreModule
        extends AbstractModule
    {
        @Override
        protected void configure()
        {
            bind( ProjectStore.class ).to( MemoryProjectStore.class );