View Javadoc

1   /*
2    * Copyright 2012 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package test.de.smartics.ci.config.hudson;
17  
18  import org.jdom.Document;
19  
20  import de.smartics.ci.config.test.JDomTestUtils;
21  
22  /**
23   * Tests manipulating Hudson XML configurations with helpers from
24   * {@link test.de.smartics.ci.config.hudson}.
25   */
26  public abstract class AbstractHudsonConfigHelperTestBase
27  {
28    // ********************************* Fields *********************************
29  
30    // --- constants ------------------------------------------------------------
31  
32    // --- members --------------------------------------------------------------
33  
34    // ****************************** Inner Classes *****************************
35  
36    // ********************************* Methods ********************************
37  
38    // --- prepare --------------------------------------------------------------
39  
40    // --- helper ---------------------------------------------------------------
41  
42    protected static final Document load(final String resource)
43      throws IllegalArgumentException
44    {
45      return JDomTestUtils.load(AbstractHudsonConfigHelperTestBase.class, resource);
46    }
47  
48    protected static final String read(final String resource)
49    {
50      return JDomTestUtils.read(AbstractHudsonConfigHelperTestBase.class, resource);
51    }
52  
53    protected static final String toString(final Document document)
54    {
55      return JDomTestUtils.toString(document);
56    }
57  
58    // --- tests ----------------------------------------------------------------
59  
60  }