-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathProxyTest.java
More file actions
49 lines (38 loc) · 1.14 KB
/
ProxyTest.java
File metadata and controls
49 lines (38 loc) · 1.14 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
package jenkins.plugins.office365connector;
import junit.framework.TestCase;
import org.junit.Before;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class ProxyTest {
private Proxy proxyTest;
private Proxy proxyTestNoCredentials;
@Before
public void setUp() {
proxyTest = new Proxy("10.0.0.1", 65654, "myUsername", "myPassword");
proxyTestNoCredentials = new Proxy("10.0.0.1", 65654, null, null);
}
@Test
public void getIp() {
assertThat("10.0.0.1").isEqualTo(proxyTest.getIp());
}
@Test
public void getPort() {
assertThat(65654).isEqualTo(proxyTest.getPort());
}
@Test
public void getUsername() {
assertThat("myUsername").isEqualTo(proxyTest.getUsername());
}
@Test
public void getPassword() {
assertThat("myPassword").isEqualTo(proxyTest.getPassword());
}
@Test
public void proxyConfigured_True() {
assertThat(proxyTest.proxyConfigured().equals(true));
}
@Test
public void proxyConfigured_False() {
assertThat(proxyTest.proxyConfigured().equals(false));
}
}