rm static

This commit is contained in:
Seraphym-Tuhai 2023-04-20 13:54:23 +03:00
parent 301b792599
commit 8d86406f69

View File

@ -65,8 +65,8 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
private static final int WIDTH = 1680; private static final int WIDTH = 1680;
private static final int HEIGHT = 1050; private static final int HEIGHT = 1050;
private static final String REMOTE_WEBDRIVER_HOST = "http://localhost:4444"; private static final String REMOTE_WEBDRIVER_HOST = "http://localhost:4444";
protected static final PageLink pageLink = new PageLink(10); protected final PageLink pageLink = new PageLink(10);
private static final ContainerTestSuite instance = ContainerTestSuite.getInstance(); private final ContainerTestSuite instance = ContainerTestSuite.getInstance();
private JavascriptExecutor js; private JavascriptExecutor js;
public static final long WAIT_TIMEOUT = TimeUnit.SECONDS.toMillis(10); public static final long WAIT_TIMEOUT = TimeUnit.SECONDS.toMillis(10);
private final Duration duration = Duration.ofMillis(WAIT_TIMEOUT); private final Duration duration = Duration.ofMillis(WAIT_TIMEOUT);
@ -136,7 +136,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
getJs().executeScript("arguments[0].click();", element); getJs().executeScript("arguments[0].click();", element);
} }
public static RuleChain getRuleChainByName(String name) { public RuleChain getRuleChainByName(String name) {
return testRestClient.getRuleChains(pageLink).getData().stream() return testRestClient.getRuleChains(pageLink).getData().stream()
.filter(s -> s.getName().equals(name)) .filter(s -> s.getName().equals(name))
.findFirst().orElse(null); .findFirst().orElse(null);
@ -148,7 +148,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
public static Customer getCustomerByName(String name) { public Customer getCustomerByName(String name) {
try { try {
return testRestClient.getCustomers(pageLink).getData().stream() return testRestClient.getCustomers(pageLink).getData().stream()
.filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0); .filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0);
@ -158,7 +158,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
} }
} }
public static DeviceProfile getDeviceProfileByName(String name) { public DeviceProfile getDeviceProfileByName(String name) {
try { try {
return testRestClient.getDeviceProfiles(pageLink).getData().stream() return testRestClient.getDeviceProfiles(pageLink).getData().stream()
.filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0); .filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0);
@ -168,7 +168,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest {
} }
} }
public static AssetProfile getAssetProfileByName(String name) { public AssetProfile getAssetProfileByName(String name) {
try { try {
return testRestClient.getAssetProfiles(pageLink).getData().stream() return testRestClient.getAssetProfiles(pageLink).getData().stream()
.filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0); .filter(x -> x.getName().equals(name)).collect(Collectors.toList()).get(0);