File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ package rnd .web ;
2
+
3
+ import java .io .File ;
4
+
5
+ import javax .ws .rs .GET ;
6
+ import javax .ws .rs .POST ;
7
+ import javax .ws .rs .Path ;
8
+ import javax .ws .rs .Produces ;
9
+ import javax .ws .rs .core .MediaType ;
10
+
11
+ import com .vladium .emma .rt .RT ;
12
+ import com .vladium .util .IProperties ;
13
+
14
+ @ Path ("/emma" )
15
+ public class EmmaController {
16
+
17
+ public EmmaController () {
18
+ }
19
+
20
+ @ GET
21
+ @ Produces (MediaType .TEXT_PLAIN )
22
+ @ Path ("/props" )
23
+ public String getAppProperties () {
24
+ IProperties appProperties = RT .getAppProperties ();
25
+ return appProperties .toProperties ().toString ();
26
+ }
27
+
28
+ @ POST
29
+ @ Produces (MediaType .TEXT_PLAIN )
30
+ @ Path ("/dump" )
31
+ public String dumpCoverage () {
32
+ String coverageOutFile = RT .getAppProperties ().getProperty ("coverage.out.file" );
33
+ RT .dumpCoverageData (new File (coverageOutFile ), false );
34
+ return coverageOutFile ;
35
+ }
36
+
37
+ }
You can’t perform that action at this time.
0 commit comments