Initial OpenECOMP MSO commit
[so.git] / common / src / test / java / org / openecomp / mso / properties / MsoPropertiesFactoryESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 09:02:51 GMT 2016
4  */
5
6 package org.openecomp.mso.properties;
7
8 import org.junit.Test;
9 import static org.junit.Assert.*;
10 import static org.evosuite.runtime.EvoAssertions.*;
11
12 import org.evosuite.runtime.EvoRunner;
13 import org.evosuite.runtime.EvoRunnerParameters;
14 import org.evosuite.runtime.PrivateAccess;
15 import org.junit.runner.RunWith;
16
17 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
18 public class MsoPropertiesFactoryESTest {
19
20   @Test(timeout = 4000)
21   public void test0()  throws Throwable  {
22       MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
23       // Undeclared exception!
24       try {
25         msoPropertiesFactory0.changeMsoPropertiesFilePath((String) null, "Unable to load the MSO properties file because format is not recognized (only .json or .properties): ");
26         fail("Expecting exception: NullPointerException");
27
28       } catch(NullPointerException e) {
29          //
30          // no message in exception (getMessage() returned null)
31          //
32       }
33   }
34
35   @Test(timeout = 4000)
36   public void test1()  throws Throwable  {
37       MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
38       msoPropertiesFactory0.removeAllMsoProperties();
39   }
40
41   @Test(timeout = 4000)
42   public void test2()  throws Throwable  {
43       MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
44       try {
45         msoPropertiesFactory0.getMsoJavaProperties("iz/`I");
46         fail("Expecting exception: Exception");
47
48       } catch(Exception e) {
49          //
50          // Mso properties not found in cache:iz/`I
51          //
52          verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
53       }
54   }
55
56   @Test(timeout = 4000)
57   public void test3()  throws Throwable  {
58       MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
59       MsoPropertiesParameters msoPropertiesParameters0 = new MsoPropertiesParameters();
60       try {
61         PrivateAccess.callMethod((Class<MsoPropertiesFactory>) MsoPropertiesFactory.class, msoPropertiesFactory0, "createObjectType", (Object) msoPropertiesParameters0, (Class<?>) MsoPropertiesParameters.class, (Object) ":8nnlF[sGvCub6J", (Class<?>) String.class);
62         fail("Expecting exception: Exception");
63
64       } catch(Exception e) {
65          //
66          // Unable to load the MSO properties file because format is not recognized (only .json or .properties): :8nnlF[sGvCub6J
67          //
68          verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
69       }
70   }
71 }