Search in sources :

Example 6 with SqlLobValue

use of org.springframework.jdbc.core.support.SqlLobValue in project sakuli by ConSol.

the class DaoTestCaseImplTest method testGetScreenshotAsSqlLobValue.

@Test
public void testGetScreenshotAsSqlLobValue() throws Exception {
    Path screenshotPath = Paths.get(this.getClass().getResource("computer.png").toURI());
    TestCase testCase = new TestCaseExampleBuilder().withException(new SakuliExceptionWithScreenshot("test-exception", screenshotPath)).buildExample();
    SqlLobValue result = testling.getScreenshotAsSqlLobValue(testCase);
    assertNotNull(result);
}
Also used : Path(java.nio.file.Path) SqlLobValue(org.springframework.jdbc.core.support.SqlLobValue) TestCase(org.sakuli.datamodel.TestCase) SakuliExceptionWithScreenshot(org.sakuli.exceptions.SakuliExceptionWithScreenshot) TestCaseExampleBuilder(org.sakuli.builder.TestCaseExampleBuilder) Test(org.testng.annotations.Test)

Aggregations

SqlLobValue (org.springframework.jdbc.core.support.SqlLobValue)6 Path (java.nio.file.Path)3 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 TestCaseExampleBuilder (org.sakuli.builder.TestCaseExampleBuilder)2 TestCase (org.sakuli.datamodel.TestCase)2 SakuliExceptionWithScreenshot (org.sakuli.exceptions.SakuliExceptionWithScreenshot)2 Test (org.testng.annotations.Test)2 TestCaseStepExampleBuilder (org.sakuli.builder.TestCaseStepExampleBuilder)1 TestCaseStep (org.sakuli.datamodel.TestCaseStep)1 MapSqlParameterSource (org.springframework.jdbc.core.namedparam.MapSqlParameterSource)1