-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTestRunnerStatementProviderTest.java
More file actions
41 lines (32 loc) · 1.21 KB
/
TestRunnerStatementProviderTest.java
File metadata and controls
41 lines (32 loc) · 1.21 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 org.utplsql.api.testRunner;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.utplsql.api.TestRunnerOptions;
import org.utplsql.api.Version;
import org.utplsql.api.rules.DatabaseRule;
import java.sql.SQLException;
public class TestRunnerStatementProviderTest {
@Rule
public final DatabaseRule db = new DatabaseRule();
@Test
public void testGettingPre303Version() {
try {
TestRunnerStatement stmt = TestRunnerStatementProvider.getCompatibleTestRunnerStatement(new Version("3.0.2"), new TestRunnerOptions(), db.newConnection());
Assert.assertEquals(Pre303TestRunnerStatement.class, stmt.getClass());
} catch (SQLException e) {
e.printStackTrace();
Assert.fail();
}
}
@Test
public void testGettingActualVersion() {
try {
TestRunnerStatement stmt = TestRunnerStatementProvider.getCompatibleTestRunnerStatement(new Version("3.0.3"), new TestRunnerOptions(), db.newConnection());
Assert.assertEquals(ActualTestRunnerStatement.class, stmt.getClass());
} catch (SQLException e) {
e.printStackTrace();
Assert.fail();
}
}
}