View Javadoc

1   /*
2    * Copyright 2013 University of Glasgow.
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 broadwick.config;
17  
18  import lombok.extern.slf4j.Slf4j;
19  import org.junit.After;
20  import org.junit.AfterClass;
21  import org.junit.Before;
22  import org.junit.BeforeClass;
23  import org.junit.ClassRule;
24  import org.junit.Rule;
25  import org.junit.Test;
26  import org.junit.rules.TestRule;
27  import org.junit.rules.TestWatcher;
28  import org.junit.runner.Description;
29  import org.junit.runners.model.Statement;
30  import org.slf4j.MarkerFactory;
31  
32  /**
33   * Test cases for broadwick.config.ConfigValidatorErrors class.
34   */
35  @Slf4j
36  public class ConfigValidationErrorsTest {
37  
38      public ConfigValidationErrorsTest() {
39      }
40  
41      @BeforeClass
42      public static void setUpClass() {
43      }
44  
45      @AfterClass
46      public static void tearDownClass() {
47      }
48  
49      @Before
50      public void setUp() {
51      }
52  
53      @After
54      public void tearDown() {
55      }
56  
57      @ClassRule // the magic is done here
58      public static TestRule classWatchman = new TestWatcher() {
59          @Override
60          protected void starting(Description description) {
61              log.info(MarkerFactory.getMarker("TEST"), "    Running tests from {} ...", description.getClassName());
62          }
63  
64      };
65      @Rule
66      public TestRule watchman = new TestWatcher() {
67          @Override
68          public Statement apply(Statement base, Description description) {
69              log.info(MarkerFactory.getMarker("TEST"), "        Running {} ...", description.getMethodName());
70              return base;
71          }
72  
73      };
74      /**
75       * Test of addError method, of class ConfigValidationErrors.
76       */
77      @Test
78      public void testAddError_String() {
79  //        System.out.println("addError");
80  //        String error = "";
81  //        ConfigValidationErrors instance = new ConfigValidationErrors();
82  //        instance.addError(error);
83  //        // TODO review the generated test code and remove the default call to fail.
84  //        fail("The test case is a prototype.");
85      }
86  
87      /**
88       * Test of addError method, of class ConfigValidationErrors.
89       */
90  //    @Test
91  //    public void testAddError_ConfigValidationErrorsStatus_String() {
92  //        System.out.println("addError");
93  //        Status status = null;
94  //        String error = "";
95  //        ConfigValidationErrors instance = new ConfigValidationErrors();
96  //        instance.addError(status, error);
97  //        // TODO review the generated test code and remove the default call to fail.
98  //        fail("The test case is a prototype.");
99  //    }
100     /**
101      * Test of getValidationErrors method, of class ConfigValidationErrors.
102      */
103 //    @Test
104 //    public void testGetValidationErrors() {
105 //        System.out.println("getValidationErrors");
106 //        ConfigValidationErrors instance = new ConfigValidationErrors();
107 //        String expResult = "";
108 //        String result = instance.getValidationErrors();
109 //        assertEquals(expResult, result);
110 //        // TODO review the generated test code and remove the default call to fail.
111 //        fail("The test case is a prototype.");
112 //    }
113     /**
114      * Test of isValid method, of class ConfigValidationErrors.
115      */
116 //    @Test
117 //    public void testIsValid() {
118 //        System.out.println("isValid");
119 //        ConfigValidationErrors instance = new ConfigValidationErrors();
120 //        boolean expResult = false;
121 //        boolean result = instance.isValid();
122 //        assertEquals(expResult, result);
123 //        // TODO review the generated test code and remove the default call to fail.
124 //        fail("The test case is a prototype.");
125 //    }
126     /**
127      * Test of getNumErrors method, of class ConfigValidationErrors.
128      */
129 //    @Test
130 //    public void testGetNumErrors() {
131 //        System.out.println("getNumErrors");
132 //        ConfigValidationErrors instance = new ConfigValidationErrors();
133 //        int expResult = 0;
134 //        int result = instance.getNumErrors();
135 //        assertEquals(expResult, result);
136 //        // TODO review the generated test code and remove the default call to fail.
137 //        fail("The test case is a prototype.");
138 //    }
139 }