forked from appium/java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppiumCommandExecutorTest.java
More file actions
41 lines (33 loc) · 1.25 KB
/
Copy pathAppiumCommandExecutorTest.java
File metadata and controls
41 lines (33 loc) · 1.25 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
package io.appium.java_client.remote;
import io.appium.java_client.AppiumClientConfig;
import io.appium.java_client.MobileCommand;
import org.junit.jupiter.api.Test;
import java.net.MalformedURLException;
import java.net.URL;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
class AppiumCommandExecutorTest {
private static final String APPIUM_URL = "https://appium.example.com";
private AppiumCommandExecutor createExecutor() {
URL baseUrl;
try {
baseUrl = new URL(APPIUM_URL);
} catch (MalformedURLException e) {
throw new AssertionError(e);
}
AppiumClientConfig clientConfig = AppiumClientConfig.defaultConfig().baseUrl(baseUrl);
return new AppiumCommandExecutor(MobileCommand.commandRepository, clientConfig);
}
@Test
void getAdditionalCommands() {
assertNotNull(createExecutor().getAdditionalCommands());
}
@Test
void getHttpClientFactory() {
assertNotNull(createExecutor().getHttpClientFactory());
}
@Test
void overrideServerUrl() {
assertDoesNotThrow(() -> createExecutor().overrideServerUrl(new URL("https://direct.example.com")));
}
}