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 java.net.URL;
23  
24  import junit.framework.TestCase;
25  
26  import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
27  
28  /**
29   * Test for {@link AbstractContinuumProjectBuilder}
30   *
31   * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
32   * @version $Id: AbstractContinuumProjectBuilderTest.java 749538 2009-03-03 05:54:49Z evenisse $
33   */
34  public abstract class AbstractContinuumProjectBuilderTest
35      extends TestCase
36  {
37  
38      private ContinuumProjectBuilder builder;
39  
40      protected void setUp()
41          throws Exception
42      {
43          super.setUp();
44          builder = new ContinuumProjectBuilder();
45      }
46  
47      /**
48       * Test for CONTINUUM-747. Disable as it requires a password protected resource under https.
49       *
50       * @throws Exception
51       */
52      public void disabledTestCreateMetadataFileURLStringString()
53          throws Exception
54      {
55          URL url = new URL( "https://someurl/pom.xml" );
56          String username = "myusername";
57          String password = "mypassword";
58          builder.createMetadataFile( url, username, password, new ContinuumProjectBuildingResult() );
59      }
60  
61      private class ContinuumProjectBuilder
62          extends AbstractContinuumProjectBuilder
63      {
64  
65          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password )
66              throws ContinuumProjectBuilderException
67          {
68              return null;
69          }
70  
71          public ContinuumProjectBuildingResult buildProjectsFromMetadata( URL url, String username, String password,
72                                                                           boolean recursiveProjects )
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              throws ContinuumProjectBuilderException
82          {
83              return null;
84          }
85  
86          public BuildDefinitionTemplate getDefaultBuildDefinitionTemplate()
87              throws ContinuumProjectBuilderException
88          {
89              return null;
90          }
91  
92      }
93  
94  }