-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathHelperTest.java
More file actions
51 lines (43 loc) · 1.62 KB
/
HelperTest.java
File metadata and controls
51 lines (43 loc) · 1.62 KB
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
package test;
import org.junit.Before;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class HelperTest {
private Boolean _isSoftDescriptorEnabled ;
private Boolean _isDynamicMCCEnabled ;
private String SoftDescriptorValue = "Valid Soft Descriptor";
private String DynamicMCCValue = "2047";
private Properties config ;
private String _requestSoftDescriptor;
private String _responseSoftDescriptor;
private String _requestDynamicMCC;
private String _responseDynamicMCC;
public HelperTest() throws IOException {
InputStream stream = this.getClass().getResourceAsStream("/config.properties");
config = new Properties();
config.load(stream);
_isSoftDescriptorEnabled = Boolean.parseBoolean(config.getProperty("isSoftDescriptorEnabled"));
_requestSoftDescriptor = _isSoftDescriptorEnabled ? SoftDescriptorValue : null;
_responseSoftDescriptor = _isSoftDescriptorEnabled ? SoftDescriptorValue : "";
_isDynamicMCCEnabled = Boolean.parseBoolean(config.getProperty("isDynamicMCCEnabled"));
_requestDynamicMCC = _isDynamicMCCEnabled ? DynamicMCCValue : null;
_responseDynamicMCC = _isDynamicMCCEnabled ? DynamicMCCValue : "";
}
public String getRequestSoftDescriptor()
{
return _requestSoftDescriptor;
}
public String getResponseSoftDescriptor()
{
return _responseSoftDescriptor;
}
public String getRequestDynamicMCC()
{
return _requestDynamicMCC;
}
public String getResponseDynamicMCC()
{
return _responseDynamicMCC;
}
}