View Javadoc

1   /*
2    * Copyright 2012-2013 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.properties.spi.config.proxy;
17  
18  import java.io.IOException;
19  
20  import org.junit.BeforeClass;
21  import org.junit.experimental.theories.DataPoint;
22  
23  import test.de.smartics.properties.spi.config.proxy.examples.TestSerializableConfigurationProperties;
24  import de.smartics.properties.spi.config.proxy.PropertiesProxyInvocationHandler;
25  import de.smartics.testdoc.annotations.Uut;
26  import de.smartics.util.test.theories.SerializationTheory;
27  
28  /**
29   * Tests {@link PropertiesProxyInvocationHandler}.
30   */
31  @Uut(type = PropertiesProxyInvocationHandler.class)
32  public class PropertiesProxyInvocationHandlerSerializableTestWithTestConfigurationProperties
33      extends SerializationTheory
34  { // NOPMD
35  
36    // ********************************* Fields *********************************
37  
38    // --- constants ------------------------------------------------------------
39  
40    // --- members --------------------------------------------------------------
41  
42    // ****************************** Inner Classes *****************************
43  
44    // ********************************* Methods ********************************
45  
46    private static TestSerializableConfigurationProperties configurationProperties;
47  
48    @BeforeClass
49    public static void setUpClass()
50    {
51      configurationProperties =
52          new TestSerializableConfigurationProperties("key");
53    }
54  
55    // --- helper ---------------------------------------------------------------
56  
57    // --- tests ----------------------------------------------------------------
58  
59    @DataPoint
60    public static PropertiesProxyInvocationHandler serializableWithTestConfigurationProperties()
61      throws IOException, ClassNotFoundException
62    {
63      final PropertiesProxyInvocationHandler ih =
64          new PropertiesProxyInvocationHandler(configurationProperties);
65      return ih;
66    }
67  
68  }