Repository navigation
Expand file tree
/
Copy pathTestRunnerTest.java
More file actions
50 lines (43 loc) · 1.45 KB
/
Copy pathTestRunnerTest.java
File metadata and controls
50 lines (43 loc) · 1.45 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
42
43
44
45
46
47
48
49
50
package io.github.utplsql.api;
import io.github.utplsql.api.reporter.*;
import io.github.utplsql.api.rules.DatabaseRule;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import java.sql.Connection;
import java.sql.SQLException;
/**
* Created by Vinicius on 13/04/2017.
*/
public class TestRunnerTest {
@Rule
public final DatabaseRule db = new DatabaseRule();
@Test
public void runWithDefaultParameters() {
try {
Connection conn = db.newConnection();
new TestRunner().run(conn);
} catch (SQLException e) {
Assert.fail(e.getMessage());
}
}
@Test
public void runWithManyReporters() {
try {
Connection conn = db.newConnection();
new TestRunner()
.addPath("ut3")
.addPath(db.getUser())
.addReporter(new DocumentationReporter().init(conn))
.addReporter(new CoverageHTMLReporter().init(conn))
.addReporter(new CoverageSonarReporter().init(conn))
.addReporter(new CoverallsReporter().init(conn))
.addReporter(new SonarTestReporter().init(conn))
.addReporter(new TeamCityReporter().init(conn))
.addReporter(new XUnitReporter().init(conn))
.run(conn);
} catch (SQLException e) {
Assert.fail(e.getMessage());
}
}
}