@@ -107,7 +107,35 @@ public void produceReportAndCloseConnection() {
107
107
Assert .assertTrue (
108
108
content .contains ("<h3>SCOTT.F</h3><h4><span class=\" green\" >100 %</span> lines covered</h4>" ));
109
109
}
110
+
111
+ @ Test
112
+ public void defaultSchemaCalculationMixedCase () {
113
+ final CodeCoverageReporter reporter = new CodeCoverageReporter (Arrays .asList (":something" ),
114
+ Arrays .asList ("scott.a" , "scott.b" , "hR.a" , "HR.B" , "hr.c" ), DatabaseTools .getConnection (dataSource ));
115
+ Assert .assertEquals ("HR" , reporter .getSchemas ());
116
+ }
117
+
118
+ @ Test
119
+ public void defaultSchemaCalculationWithoutIncludeObjects () {
120
+ final CodeCoverageReporter reporter = new CodeCoverageReporter (Arrays .asList (":something" ),
121
+ Arrays .asList (), DatabaseTools .getConnection (dataSource ));
122
+ Assert .assertEquals (null , reporter .getSchemas ());
123
+ }
110
124
125
+ @ Test
126
+ public void defaultSchemaCalculationWithoutOwnerInformation () {
127
+ final CodeCoverageReporter reporter = new CodeCoverageReporter (Arrays .asList (":something" ),
128
+ Arrays .asList ("a" , "b" , "c" ), DatabaseTools .getConnection (dataSource ));
129
+ Assert .assertEquals (null , reporter .getSchemas ());
130
+ }
131
+
132
+ @ Test
133
+ public void defaultSchemaCalculationWithJustOneOwner () {
134
+ final CodeCoverageReporter reporter = new CodeCoverageReporter (Arrays .asList (":something" ),
135
+ Arrays .asList ("a" , "b" , "scott.c" ), DatabaseTools .getConnection (dataSource ));
136
+ Assert .assertEquals ("SCOTT" , reporter .getSchemas ());
137
+ }
138
+
111
139
@ After
112
140
public void teardown () {
113
141
executeAndIgnore (jdbcTemplate , "DROP PACKAGE test_f" );
0 commit comments