forked from swiesend/secret-service
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSessionTest.java
More file actions
47 lines (36 loc) · 1.11 KB
/
Copy pathSessionTest.java
File metadata and controls
47 lines (36 loc) · 1.11 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
package de.swiesend.secretservice.integration;
import de.swiesend.secretservice.Static;
import de.swiesend.secretservice.integration.test.Context;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.jupiter.api.Assertions.*;
public class SessionTest {
private Logger log = LoggerFactory.getLogger(getClass());
private Context context;
@BeforeEach
public void beforeEach(TestInfo info) {
log.info(info.getDisplayName());
context = new Context(log);
context.ensureSession();
}
@AfterEach
public void afterEach() {
context.after();
}
@Test
public void close() {
assertDoesNotThrow(() -> context.session.close());
}
@Test
public void isRemote() {
assertFalse(context.session.isRemote());
}
@Test
public void getObjectPath() {
assertTrue(context.session.getObjectPath().startsWith(Static.ObjectPaths.SESSION + "/s"));
}
}