-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettingControllerTest.java
31 lines (26 loc) · 1.07 KB
/
SettingControllerTest.java
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
@isTest
private class SettingControllerTest {
static testMethod void test_get_settings() {
SettingsController s = new SettingsController();
List<String> types= s.getCampaignTypes();
System.assertNotEquals(types, null);
boolean size = types.size() >= 1;
System.assertEquals(size, true);
}
static testMethod void test_update_settings() {
String[] info = SettingsController.check_settings();
System.assertEquals(info[0], 'Responded');
System.assertEquals(info[1], 'Sent');
System.assertEquals(info[2], 'All');
SettingsController.update_settings('1', '2', 'None');
info = SettingsController.check_settings();
System.assertEquals(info[0], '1');
System.assertEquals(info[1], '2');
System.assertEquals(info[2], 'None');
SettingsController.update_settings('2', '1', 'None');
info = SettingsController.check_settings();
System.assertEquals(info[0], '2');
System.assertEquals(info[1], '1');
System.assertEquals(info[2], 'None');
}
}