View Javadoc

1   package org.apache.maven.continuum.project.builder;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import junit.framework.TestCase;
23  import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
24  
25  import java.net.URL;
26  
27  /**
28   * Test for {@link AbstractContinuumProjectBuilder}
29   *
30   * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
31   * @version $Id: AbstractContinuumProjectBuilderTest.java 1391353 2012-09-28 07:50:49Z brett $
32   */
33  public abstract class AbstractContinuumProjectBuilderTest
34      extends TestCase
35  {
36  
37      private ContinuumProjectBuilder builder;
38  
39      protected void setUp()
40          throws Exception
41      {
42          super.setUp();
43          builder = new ContinuumProjectBuilder();
44      }
45  
46      /**
47       * Test for CONTINUUM-747. Disable as it requires a password protected resource under https.
48       *
49       * @throws Exception
50       */
51      public void disabledTestCreateMetadataFileURLStringString()
52          throws Exception
53      {
54          URL url = new URL( "https://someurl/pom.xml" );
55          String username = "myusername";
56          String password = "mypassword";
57          builder.createMetadataFile( url, username, password, new ContinuumProjectBuildingResult() );
58      }
59  
60      private class ContinuumProjectBuilder
61          extends AbstractContinuumProjectBuilder
62      {
63  
64          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password )
65              throws ContinuumProjectBuilderException
66          {
67              return null;
68          }
69  
70          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
71                                                                           boolean recursiveProjects,
72                                                                           boolean checkoutInSingleDirectory )
73              throws ContinuumProjectBuilderException
74          {
75              return null;
76          }
77  
78          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
79                                                                           boolean recursiveProjects,
80                                                                           BuildDefinitionTemplate buildDefinitionTemplate,
81                                                                           boolean checkoutInSingleDirectory )
82              throws ContinuumProjectBuilderException
83          {
84              return null;
85          }
86  
87          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
88                                                                           boolean recursiveProjects,
89                                                                           BuildDefinitionTemplate buildDefinitionTemplate,
90                                                                           boolean checkoutInSingleDirectory,
91                                                                           int projectGroupId )
92              throws ContinuumProjectBuilderException
93          {
94              return null;
95          }
96  
97          public BuildDefinitionTemplate getDefaultBuildDefinitionTemplate()
98              throws ContinuumProjectBuilderException
99          {
100             return null;
101         }
102 
103     }
104 
105 }