11package org .utplsql .cli ;
22
3+ import org .hamcrest .Matchers ;
34import org .junit .jupiter .api .Test ;
45import org .utplsql .cli .config .FileMapperConfig ;
56import org .utplsql .cli .config .ReporterConfig ;
@@ -192,6 +193,7 @@ void sourceFileMapping() throws Exception {
192193 assertEquals ( 1 , sourceMapperConfig .getTypeSubexpression ());
193194 assertEquals ( 3 , sourceMapperConfig .getNameSubexpression ());
194195 }
196+
195197 @ Test
196198 void testFileMapping () throws Exception {
197199 RunCommandConfig config = parseForConfig ("run" ,
@@ -214,4 +216,20 @@ void testFileMapping() throws Exception {
214216 assertEquals ( 5 , testMapperConfig .getTypeSubexpression ());
215217 assertEquals ( 6 , testMapperConfig .getNameSubexpression ());
216218 }
219+
220+ @ Test
221+ void testFileMappingWithoutDetails () throws Exception {
222+ RunCommandConfig config = parseForConfig ("run" ,
223+ TestHelper .getConnectionString (),
224+ "-test_path=src/test/resources/plsql/test" );
225+
226+ FileMapperConfig testMapperConfig = config .getTestMapping ();
227+ assertEquals ( "src/test/resources/plsql/test" , testMapperConfig .getPath ());
228+ assertNull ( testMapperConfig .getOwner ());
229+ assertNull ( testMapperConfig .getRegexExpression ());
230+ assertThat ( testMapperConfig .getTypeMapping (), anEmptyMap ());
231+ assertNull ( testMapperConfig .getOwnerSubexpression ());
232+ assertNull ( testMapperConfig .getTypeSubexpression ());
233+ assertNull ( testMapperConfig .getNameSubexpression ());
234+ }
217235}
0 commit comments