|
1 | 1 | create or replace package body test_expect_not_to_be_null |
2 | 2 | is |
| 3 | + procedure cleanup_expectations |
| 4 | + is |
| 5 | + begin |
| 6 | + ut3.ut_expectation_processor.clear_expectations(); |
| 7 | + end; |
| 8 | + |
3 | 9 | procedure blob_not_null |
4 | 10 | is |
5 | 11 | begin |
6 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'blob', 'to_blob(''abc'')'); |
7 | | - expectations_helpers.test_success_expectacion; |
| 12 | + --Act |
| 13 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'blob', 'to_blob(''abc'')'); |
| 14 | + --Assert |
| 15 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
8 | 16 | end; |
9 | 17 |
|
10 | 18 | procedure blob_0_lengt |
11 | 19 | is |
12 | 20 | begin |
13 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'blob', 'empty_blob()'); |
14 | | - expectations_helpers.test_success_expectacion; |
| 21 | + --Act |
| 22 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'blob', 'empty_blob()'); |
| 23 | + --Assert |
| 24 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
15 | 25 | end; |
16 | 26 |
|
17 | 27 | procedure boolean_not_null |
18 | 28 | is |
19 | 29 | begin |
20 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'boolean', 'true'); |
21 | | - expectations_helpers.test_success_expectacion; |
| 30 | + --Act |
| 31 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'boolean', 'true'); |
| 32 | + --Assert |
| 33 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
22 | 34 | end; |
23 | 35 |
|
24 | 36 | procedure clob_not_null |
25 | 37 | is |
26 | 38 | begin |
27 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'clob', 'to_clob(''abc'')'); |
28 | | - expectations_helpers.test_success_expectacion; |
| 39 | + --Act |
| 40 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'clob', 'to_clob(''abc'')'); |
| 41 | + --Assert |
| 42 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
29 | 43 | end; |
30 | 44 |
|
31 | 45 |
|
32 | 46 | procedure clob_0_lengt |
33 | 47 | is |
34 | 48 | begin |
35 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'clob', 'empty_clob()'); |
36 | | - expectations_helpers.test_success_expectacion; |
| 49 | + --Act |
| 50 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'clob', 'empty_clob()'); |
| 51 | + --Assert |
| 52 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
37 | 53 | end; |
38 | 54 |
|
39 | 55 | procedure date_not_null |
40 | 56 | is |
41 | 57 | begin |
42 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'date', 'sysdate'); |
43 | | - expectations_helpers.test_success_expectacion; |
| 58 | + --Act |
| 59 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'date', 'sysdate'); |
| 60 | + --Assert |
| 61 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
44 | 62 | end; |
45 | 63 |
|
46 | 64 | procedure number_not_null |
47 | 65 | is |
48 | 66 | begin |
49 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'number', '1234'); |
50 | | - expectations_helpers.test_success_expectacion; |
| 67 | + --Act |
| 68 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'number', '1234'); |
| 69 | + --Assert |
| 70 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
51 | 71 | end; |
52 | 72 |
|
53 | 73 | procedure timestamp_not_null |
54 | 74 | is |
55 | 75 | begin |
56 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp', 'systimestamp'); |
57 | | - expectations_helpers.test_success_expectacion; |
| 76 | + --Act |
| 77 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp', 'systimestamp'); |
| 78 | + --Assert |
| 79 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
58 | 80 | end; |
59 | 81 |
|
60 | 82 | procedure timestamp_with_ltz_not_null |
61 | 83 | is |
62 | 84 | begin |
63 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp with local time zone', 'systimestamp'); |
64 | | - expectations_helpers.test_success_expectacion; |
| 85 | + --Act |
| 86 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp with local time zone', 'systimestamp'); |
| 87 | + --Assert |
| 88 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
65 | 89 | end; |
66 | 90 |
|
67 | 91 | procedure timestamp_with_tz_not_null |
68 | 92 | is |
69 | 93 | begin |
70 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp with time zone', 'systimestamp'); |
71 | | - expectations_helpers.test_success_expectacion; |
| 94 | + --Act |
| 95 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp with time zone', 'systimestamp'); |
| 96 | + --Assert |
| 97 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
72 | 98 | end; |
73 | 99 |
|
74 | 100 | procedure varchar2_not_null |
75 | 101 | is |
76 | 102 | begin |
77 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'varchar2(4000)', '''abc'''); |
78 | | - expectations_helpers.test_success_expectacion; |
| 103 | + --Act |
| 104 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'varchar2(4000)', '''abc'''); |
| 105 | + --Assert |
| 106 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty(); |
79 | 107 | end; |
80 | 108 |
|
81 | 109 | procedure null_blob |
82 | 110 | is |
83 | 111 | begin |
84 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'blob', 'null'); |
85 | | - expectations_helpers.test_failure_expectacion; |
| 112 | + --Act |
| 113 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'blob', 'null'); |
| 114 | + --Assert |
| 115 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
86 | 116 | end; |
87 | 117 |
|
88 | 118 |
|
89 | 119 | procedure null_boolean |
90 | 120 | is |
91 | 121 | begin |
92 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'boolean', 'null'); |
93 | | - expectations_helpers.test_failure_expectacion; |
| 122 | + --Act |
| 123 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'boolean', 'null'); |
| 124 | + --Assert |
| 125 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
94 | 126 | end; |
95 | 127 |
|
96 | 128 |
|
97 | 129 | procedure null_clob |
98 | 130 | is |
99 | 131 | begin |
100 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'clob', 'null'); |
101 | | - expectations_helpers.test_failure_expectacion; |
| 132 | + --Act |
| 133 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'clob', 'null'); |
| 134 | + --Assert |
| 135 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
102 | 136 | end; |
103 | 137 |
|
104 | 138 |
|
105 | 139 | procedure null_date |
106 | 140 | is |
107 | 141 | begin |
108 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'date', 'null'); |
109 | | - expectations_helpers.test_failure_expectacion; |
| 142 | + --Act |
| 143 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'date', 'null'); |
| 144 | + --Assert |
| 145 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
110 | 146 | end; |
111 | 147 |
|
112 | 148 |
|
113 | 149 | procedure null_number |
114 | 150 | is |
115 | 151 | begin |
116 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'number', 'null'); |
117 | | - expectations_helpers.test_failure_expectacion; |
| 152 | + --Act |
| 153 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'number', 'null'); |
| 154 | + --Assert |
| 155 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
118 | 156 | end; |
119 | 157 |
|
120 | 158 |
|
121 | 159 | procedure null_timestamp |
122 | 160 | is |
123 | 161 | begin |
124 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp', 'null'); |
125 | | - expectations_helpers.test_failure_expectacion; |
| 162 | + --Act |
| 163 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp', 'null'); |
| 164 | + --Assert |
| 165 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
126 | 166 | end; |
127 | 167 |
|
128 | 168 |
|
129 | 169 | procedure null_timestamp_with_ltz |
130 | 170 | is |
131 | 171 | begin |
132 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp with local time zone', 'null'); |
133 | | - expectations_helpers.test_failure_expectacion; |
| 172 | + --Act |
| 173 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp with local time zone', 'null'); |
| 174 | + --Assert |
| 175 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
134 | 176 | end; |
135 | 177 |
|
136 | 178 |
|
137 | 179 | procedure null_timestamp_with_tz |
138 | 180 | is |
139 | 181 | begin |
140 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'timestamp with time zone', 'null'); |
141 | | - expectations_helpers.test_failure_expectacion; |
| 182 | + --Act |
| 183 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'timestamp with time zone', 'null'); |
| 184 | + --Assert |
| 185 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
142 | 186 | end; |
143 | 187 |
|
144 | 188 |
|
145 | 189 | procedure null_varchar2 |
146 | 190 | is |
147 | 191 | begin |
148 | | - expectations_helpers.execute_unary_expectation('not_to_be_null', 'varchar2(4000)', 'null'); |
149 | | - expectations_helpers.test_failure_expectacion; |
| 192 | + --Act |
| 193 | + execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'varchar2(4000)', 'null'); |
| 194 | + --Assert |
| 195 | + ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty(); |
150 | 196 | end; |
151 | 197 |
|
152 | 198 | end test_expect_not_to_be_null; |
|
0 commit comments