535d9298078a0fd5859ffbbadd591cf9baac657d
[so.git] / common / src / test / java / org / openecomp / mso / properties / AbstractMsoPropertiesESTest.java
1 /*
2  * This file was automatically generated by EvoSuite
3  * Mon Nov 14 09:09:20 GMT 2016
4  */
5
6 package org.openecomp.mso.properties;
7
8 import static org.evosuite.runtime.EvoAssertions.verifyException;
9 import static org.junit.Assert.assertEquals;
10 import static org.junit.Assert.assertTrue;
11 import static org.junit.Assert.fail;
12
13 import java.io.FileNotFoundException;
14
15 import org.evosuite.runtime.EvoRunner;
16 import org.evosuite.runtime.EvoRunnerParameters;
17 import org.junit.Ignore;
18 import org.junit.Test;
19 import org.junit.runner.RunWith;
20
21 @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
22 public class AbstractMsoPropertiesESTest extends AbstractMsoPropertiesESTestscaffolding {
23
24   @Test(timeout = 4000)
25   public void test00()  throws Throwable  {
26       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
27       String string0 = msoJavaProperties0.toString();
28       assertEquals("Config file null(Timer:0mins):\n\n\n", string0);
29   }
30
31   @Test(timeout = 4000)
32   public void test01()  throws Throwable  {
33       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
34       MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
35       msoJavaProperties1.propertiesFileName = "+";
36       msoJavaProperties1.getPropertiesFileName();
37       assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
38   }
39
40   @Test(timeout = 4000)
41   public void test02()  throws Throwable  {
42       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
43       MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
44       msoJavaProperties1.propertiesFileName = "";
45       msoJavaProperties1.getPropertiesFileName();
46       assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
47   }
48
49   @Test(timeout = 4000)
50   public void test03()  throws Throwable  {
51       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
52       msoJavaProperties0.automaticRefreshInMinutes = (-1447);
53       int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
54       assertEquals((-1447), int0);
55   }
56
57   @Test(timeout = 4000)
58   public void test04()  throws Throwable  {
59       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
60       msoJavaProperties0.equals(msoJavaProperties0);
61       assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
62   }
63
64   @Test(timeout = 4000)
65   public void test05()  throws Throwable  {
66       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
67       msoJavaProperties0.equals("X<0P%qxWR  fu\"");
68       assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
69   }
70
71   @Test(timeout = 4000)
72   public void test06()  throws Throwable  {
73       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
74       MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
75       assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
76   }
77
78   @Test(timeout = 4000)
79   public void test07()  throws Throwable  {
80       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
81       msoJavaProperties0.automaticRefreshInMinutes = (-1447);
82       MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
83       assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
84   }
85
86   /**
87    * TODO: fails when run using maven, but succeeds when run using eclipse   
88    * @throws Throwable
89    */
90   @Ignore
91   @Test(timeout = 4000)
92   public void test08()  throws Throwable  {
93       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
94       // Undeclared exception!
95       try { 
96         msoJavaProperties0.reloadPropertiesFile();
97         fail("Expecting exception: NullPointerException");
98       
99       } catch(NullPointerException e) {
100          //
101          // no message in exception (getMessage() returned null)
102          //
103          verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
104       }
105   }
106
107   @Test(timeout = 4000)
108   public void test09()  throws Throwable  {
109       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
110       msoJavaProperties0.propertiesFileName = "ASDC_ARTIFACT_ALREADY_DEPLOYED";
111       try { 
112         msoJavaProperties0.reloadPropertiesFile();
113         fail("Expecting exception: FileNotFoundException");
114       
115       } catch(FileNotFoundException e) {
116          //
117          // no message in exception (getMessage() returned null)
118          //
119          verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
120       }
121   }
122
123   @Test(timeout = 4000)
124   public void test10()  throws Throwable  {
125       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
126       try { 
127         msoJavaProperties0.loadPropertiesFile("Trying to reset value handler for type [");
128         fail("Expecting exception: FileNotFoundException");
129       
130       } catch(FileNotFoundException e) {
131          //
132          // no message in exception (getMessage() returned null)
133          //
134          verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
135       }
136   }
137
138   @Test(timeout = 4000)
139   public void test11()  throws Throwable  {
140       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
141       msoJavaProperties0.getPropertiesFileName();
142       assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
143   }
144
145   @Test(timeout = 4000)
146   public void test12()  throws Throwable  {
147       MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
148       int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
149       assertEquals(0, int0);
150   }
151 }