use of com.hribol.automation.core.utils.LoadingTimes in project selenium_java by sergueik.
the class ReplayBrowserTest method replayInvokesExecutionExecuteMethod.
@Test
public void replayInvokesExecutionExecuteMethod() throws InterruptedException, IOException, URISyntaxException {
ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
TestScenario testScenario = Mockito.mock(TestScenario.class);
WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory);
replayBrowser.replay(testScenario, webDriverActionExecution);
Mockito.verify(webDriverActionExecution).execute(testScenario);
}
use of com.hribol.automation.core.utils.LoadingTimes in project selenium_java by sergueik.
the class ReplayBrowserTest method replayFromFileInvokesExecutionExecuteMethod.
@Test
public void replayFromFileInvokesExecutionExecuteMethod() throws InterruptedException, IOException, URISyntaxException {
ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
TestScenario testScenario = Mockito.mock(TestScenario.class);
WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
TestScenarioFactory testScenarioFactory = Mockito.mock(TestScenarioFactory.class);
String pathToSerializedTest = "testcase.json";
Mockito.when(testScenarioFactory.createFromFile(applicationActionFactory, pathToSerializedTest)).thenReturn(testScenario);
ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory, testScenarioFactory);
replayBrowser.replay(pathToSerializedTest, webDriverActionExecution);
Mockito.verify(webDriverActionExecution).execute(testScenario);
}
Aggregations