Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 82bf554

Browse files
add test case for issue #5 - missing line break before methods
1 parent 97c3ca4 commit 82bf554

File tree

1 file changed

+84
-0
lines changed
  • sqldev/src/test/java/com/trivadis/plsql/formatter/settings/tests

1 file changed

+84
-0
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
package com.trivadis.plsql.formatter.settings.tests
2+
3+
import com.trivadis.plsql.formatter.settings.ConfiguredTestFormatter
4+
import oracle.dbtools.app.Format
5+
import org.junit.Before
6+
import org.junit.Test
7+
8+
class Issue_5 extends ConfiguredTestFormatter {
9+
10+
@Before
11+
def void setup() {
12+
formatter.options.put(formatter.kwCase, Format.Case.lower)
13+
}
14+
15+
@Test
16+
def object_type_spec_overriding_member_function() {
17+
'''
18+
create or replace type ut_xunit_reporter under ut_junit_reporter (
19+
constructor function ut_xunit_reporter (
20+
self in out nocopy ut_xunit_reporter
21+
) return self as result,
22+
overriding member function get_description return varchar2
23+
) not final
24+
/
25+
'''.formatAndAssert
26+
}
27+
28+
@Test
29+
def object_type_spec_overriding_final_member_function() {
30+
'''
31+
create or replace type ut_xunit_reporter under ut_junit_reporter (
32+
constructor function ut_xunit_reporter (
33+
self in out nocopy ut_xunit_reporter
34+
) return self as result,
35+
final member function get_description return varchar2
36+
) not final
37+
/
38+
'''.formatAndAssert
39+
}
40+
41+
@Test
42+
def object_type_body_overriding_member_function() {
43+
'''
44+
create or replace type body ut_xunit_reporter is
45+
constructor function ut_xunit_reporter (
46+
self in out nocopy ut_xunit_reporter
47+
) return self as result is
48+
begin
49+
self.init($$plsql_unit);
50+
return;
51+
end;
52+
overriding member function get_description return varchar2 as
53+
begin
54+
return 'Depracated reporter. Please use Junit.
55+
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578';
56+
end;
57+
end;
58+
/
59+
'''.formatAndAssert
60+
}
61+
62+
@Test
63+
def object_type_body_final_member_function() {
64+
'''
65+
create or replace type body ut_xunit_reporter is
66+
constructor function ut_xunit_reporter (
67+
self in out nocopy ut_xunit_reporter
68+
) return self as result is
69+
begin
70+
self.init($$plsql_unit);
71+
return;
72+
end;
73+
final member function get_description return varchar2 as
74+
begin
75+
return 'Depracated reporter. Please use Junit.
76+
Provides outcomes in a format conforming with JUnit 4 and above as defined in: https://gist.github.com/kuzuha/232902acab1344d6b578';
77+
end;
78+
end;
79+
/
80+
'''.formatAndAssert
81+
}
82+
83+
84+
}

0 commit comments

Comments
 (0)