aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java
blob: 535d9298078a0fd5859ffbbadd591cf9baac657d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
 * This file was automatically generated by EvoSuite
 * Mon Nov 14 09:09:20 GMT 2016
 */

package org.openecomp.mso.properties;

import static org.evosuite.runtime.EvoAssertions.verifyException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.FileNotFoundException;

import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
public class AbstractMsoPropertiesESTest extends AbstractMsoPropertiesESTestscaffolding {

  @Test(timeout = 4000)
  public void test00()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      String string0 = msoJavaProperties0.toString();
      assertEquals("Config file null(Timer:0mins):\n\n\n", string0);
  }

  @Test(timeout = 4000)
  public void test01()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
      msoJavaProperties1.propertiesFileName = "+";
      msoJavaProperties1.getPropertiesFileName();
      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test02()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
      msoJavaProperties1.propertiesFileName = "";
      msoJavaProperties1.getPropertiesFileName();
      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test03()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
      assertEquals((-1447), int0);
  }

  @Test(timeout = 4000)
  public void test04()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.equals(msoJavaProperties0);
      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test05()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.equals("X<0P%qxWR  fu\"");
      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test06()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test07()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
      assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
  }

  /**
   * TODO: fails when run using maven, but succeeds when run using eclipse   
   * @throws Throwable
   */
  @Ignore
  @Test(timeout = 4000)
  public void test08()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      // Undeclared exception!
      try { 
        msoJavaProperties0.reloadPropertiesFile();
        fail("Expecting exception: NullPointerException");
      
      } catch(NullPointerException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
      }
  }

  @Test(timeout = 4000)
  public void test09()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.propertiesFileName = "ASDC_ARTIFACT_ALREADY_DEPLOYED";
      try { 
        msoJavaProperties0.reloadPropertiesFile();
        fail("Expecting exception: FileNotFoundException");
      
      } catch(FileNotFoundException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
      }
  }

  @Test(timeout = 4000)
  public void test10()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      try { 
        msoJavaProperties0.loadPropertiesFile("Trying to reset value handler for type [");
        fail("Expecting exception: FileNotFoundException");
      
      } catch(FileNotFoundException e) {
         //
         // no message in exception (getMessage() returned null)
         //
         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
      }
  }

  @Test(timeout = 4000)
  public void test11()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      msoJavaProperties0.getPropertiesFileName();
      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
  }

  @Test(timeout = 4000)
  public void test12()  throws Throwable  {
      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
      assertEquals(0, int0);
  }
}