@@ -45,34 +45,34 @@ class TestTemplate {
45
45
«val packageName = ' ' ' «context. testPackagePrefix»«objectName»«context. testPackageSuffix»' ' ' »
46
46
CREATE OR REPLACE PACKAGE «packageName» IS
47
47
48
- «IF context.generateComments»
49
- /* generated by utPLSQL for SQL Developer on «today» */
50
-
51
- «ENDIF»
52
- --%suite(«packageName»)
53
- «IF !context.suitePath.empty»
54
- --%suitepath(«context.suitePath»)
55
- «ENDIF»
56
-
57
- «FOR u : units»
58
- «val unit = u.toLowerCase»
59
- «IF context.numberOfTestsPerUnit > 1 && (context.objectType == "PACKAGE" || context.objectType == "TYPE")»
60
- --%context(«unit»)
48
+ «IF context.generateComments»
49
+ /* generated by utPLSQL for SQL Developer on «today» */
61
50
62
51
«ENDIF»
63
- «FOR i : 1 .. context.numberOfTestsPerUnit»
64
- --%test
65
- «IF context.disableTests»
66
- --%disabled
52
+ --%suite(«packageName»)
53
+ «IF !context.suitePath.empty»
54
+ --%suitepath(«context.suitePath»)
55
+ «ENDIF»
56
+
57
+ «FOR u : units»
58
+ «val unit = u.toLowerCase»
59
+ «IF context.numberOfTestsPerUnit > 1 && (context.objectType == "PACKAGE" || context.objectType == "TYPE")»
60
+ --%context(«unit»)
61
+
67
62
«ENDIF»
68
- PROCEDURE «context.testUnitPrefix»«unit»«context.testUnitSuffix»«IF context.numberOfTestsPerUnit > 1»«i»«ENDIF»;
63
+ «FOR i : 1 .. context.numberOfTestsPerUnit»
64
+ --%test
65
+ «IF context.disableTests»
66
+ --%disabled
67
+ «ENDIF»
68
+ PROCEDURE «context.testUnitPrefix»«unit»«context.testUnitSuffix»«IF context.numberOfTestsPerUnit > 1»«i»«ENDIF»;
69
69
70
- «ENDFOR»
71
- «IF context.numberOfTestsPerUnit > 1 && (context.objectType == "PACKAGE" || context.objectType == "TYPE")»
72
- --%endcontext
70
+ «ENDFOR»
71
+ «IF context.numberOfTestsPerUnit > 1 && (context.objectType == "PACKAGE" || context.objectType == "TYPE")»
72
+ --%endcontext
73
73
74
- «ENDIF»
75
- «ENDFOR»
74
+ «ENDIF»
75
+ «ENDFOR»
76
76
END «packageName»;
77
77
/
78
78
' ' '
@@ -84,38 +84,37 @@ class TestTemplate {
84
84
«val objectName = context.objectName.toLowerCase»
85
85
CREATE OR REPLACE PACKAGE BODY «context.testPackagePrefix»«objectName»«context.testPackageSuffix» IS
86
86
87
- «IF context.generateComments»
88
- /* generated by utPLSQL for SQL Developer on «today» */
87
+ «IF context.generateComments»
88
+ /* generated by utPLSQL for SQL Developer on «today» */
89
89
90
- «ENDIF»
91
- «FOR u : units»
92
- «val unit = u.toLowerCase»
93
- «FOR i : 1 .. context.numberOfTestsPerUnit»
94
- «val procedureName = ' ' ' «context. testUnitPrefix»«unit»«context. testUnitSuffix»«IF context. numberOfTestsPerUnit > 1 »«i»«ENDIF »' ' ' »
95
- «IF context.generateComments»
96
- --
97
- -- test «unit»«IF context.numberOfTestsPerUnit > 0» case «i»: ...«ENDIF»
98
- --
99
- «ENDIF»
100
- PROCEDURE «procedureName» IS
101
- l_actual INTEGER := 0;
102
- l_expected INTEGER := 1;
103
- BEGIN
90
+ «ENDIF»
91
+ «FOR u : units»
92
+ «val unit = u.toLowerCase»
93
+ «FOR i : 1 .. context.numberOfTestsPerUnit»
94
+ «val procedureName = ' ' ' «context. testUnitPrefix»«unit»«context. testUnitSuffix»«IF context. numberOfTestsPerUnit > 1 »«i»«ENDIF »' ' ' »
104
95
«IF context.generateComments»
105
- -- populate actual
106
- -- «objectName».«unit»;
96
+ --
97
+ -- test «unit»«IF context.numberOfTestsPerUnit > 0» case «i»: ...«ENDIF»
98
+ --
99
+ «ENDIF»
100
+ PROCEDURE «procedureName» IS
101
+ l_actual INTEGER := 0;
102
+ l_expected INTEGER := 1;
103
+ BEGIN
104
+ «IF context.generateComments»
105
+ -- populate actual
106
+ -- «objectName».«unit»;
107
107
108
- -- populate expected
109
- -- ...
108
+ -- populate expected
109
+ -- ...
110
110
111
- -- assert
112
- «ENDIF»
113
- ut.expect(l_actual).to_equal(l_expected);
114
- END «procedureName»;
111
+ -- assert
112
+ «ENDIF»
113
+ ut.expect(l_actual).to_equal(l_expected);
114
+ END «procedureName»;
115
115
116
+ «ENDFOR»
116
117
«ENDFOR»
117
- «ENDFOR»
118
-
119
118
END «context.testPackagePrefix»«objectName»«context.testPackageSuffix»;
120
119
/
121
120
' ' '
0 commit comments