|
| 1 | +<?xml version = '1.0' encoding = 'UTF-8'?> |
| 2 | +<snippets> |
| 3 | + <group category="utPLSQL Annotations" language="PLSQL"> |
| 4 | + <snippet name="suite" description="Package level. Mandatory. Marks package as a test suite. Optional suite description can be provided (see displayname)."> |
| 5 | + <code> |
| 6 | + <![CDATA[--%suite(<description>)]]> |
| 7 | + </code> |
| 8 | + </snippet> |
| 9 | + <snippet name="suitepath" description="Package level. Similar to java package. The annotation allows logical grouping of suites into hierarchies."> |
| 10 | + <code> |
| 11 | + <![CDATA[--%suitepath(<path>)]]> |
| 12 | + </code> |
| 13 | + </snippet> |
| 14 | + <snippet name="displayname" description="Package/procedure leve. Human-readable and meaningful description of a context/suite/test. Provides description to a context when used within context. When used with test or suite annotation, overrides the <description> provided with suite/test."> |
| 15 | + <code> |
| 16 | + <![CDATA[--%displayname(<description>)]]> |
| 17 | + </code> |
| 18 | + </snippet> |
| 19 | + <snippet name="test" description="Procedure level. Denotes that the annotated procedure is a unit test procedure. Optional test description can by provided (see displayname)."> |
| 20 | + <code> |
| 21 | + <![CDATA[--%test(<description>)]]> |
| 22 | + </code> |
| 23 | + </snippet> |
| 24 | + <snippet name="throws" description="Procedure level. Denotes that the annotated test procedure must throw one of the exceptions provided. Supported forms of exceptions are: numeric literals, numeric contant names, exception constant names, predefined Oracle exception names."> |
| 25 | + <code> |
| 26 | + <![CDATA[--%throws(<exception>[,...])]]> |
| 27 | + </code> |
| 28 | + </snippet> |
| 29 | + <snippet name="beforeall" description="Procedure level. Denotes that the annotated procedure should be executed once before all elements of the suite."> |
| 30 | + <code> |
| 31 | + <![CDATA[--%beforeall]]> |
| 32 | + </code> |
| 33 | + </snippet> |
| 34 | + <snippet name="afterall" description="Procedure level. Denotes that the annotated procedure should be executed once after all elements of the suite."> |
| 35 | + <code> |
| 36 | + <![CDATA[--%afterall]]> |
| 37 | + </code> |
| 38 | + </snippet> |
| 39 | + <snippet name="beforeeach" description="Procedure level. 	Denotes that the annotated procedure should be executed before each %test procedure in the suite."> |
| 40 | + <code> |
| 41 | + <![CDATA[--%beforeeach]]> |
| 42 | + </code> |
| 43 | + </snippet> |
| 44 | + <snippet name="aftereach" description="	Procedure level. Denotes that the annotated procedure should be executed after each %test procedure in the suite."> |
| 45 | + <code> |
| 46 | + <![CDATA[--%aftereach]]> |
| 47 | + </code> |
| 48 | + </snippet> |
| 49 | + <snippet name="beforeall package level" description="Package level. Denotes that the mentioned procedure(s) should be executed once before all elements of the suite."> |
| 50 | + <code> |
| 51 | + <![CDATA[--%beforeall([[<owner>.]<package>.]<procedure>[,...])]]> |
| 52 | + </code> |
| 53 | + </snippet> |
| 54 | + <snippet name="afterall package level" description="Package level. 	Denotes that the mentioned procedure(s) should be executed once after all elements of the suite."> |
| 55 | + <code> |
| 56 | + <![CDATA[--%afterall([[<owner>.]<package>.]<procedure>[,...])]]> |
| 57 | + </code> |
| 58 | + </snippet> |
| 59 | + <snippet name="beforeeach package level" description="Package level. Denotes that the mentioned procedure(s) should be executed before each %test procedure in the suite."> |
| 60 | + <code> |
| 61 | + <![CDATA[--%beforeeach([[<owner>.]<package>.]<procedure>[,...])]]> |
| 62 | + </code> |
| 63 | + </snippet> |
| 64 | + <snippet name="aftereach package level" description="Package level. Denotes that the mentioned procedure(s) should be executed after each %test procedure in the suite."> |
| 65 | + <code> |
| 66 | + <![CDATA[--%aftereach([[<owner>.]<package>.]<procedure>[,...])]]> |
| 67 | + </code> |
| 68 | + </snippet> |
| 69 | + <snippet name="beforetest" description="Procedure level. Denotes that mentioned procedure(s) should be executed before the annotated %test procedure."> |
| 70 | + <code> |
| 71 | + <![CDATA[--%beforetest([[<owner>.]<package>.]<procedure>[,...])]]> |
| 72 | + </code> |
| 73 | + </snippet> |
| 74 | + <snippet name="aftertest" description="Procedure level. Denotes that mentioned procedure(s) should be executed after the annotated %test procedure"> |
| 75 | + <code> |
| 76 | + <![CDATA[--%aftertest([[<owner>.]<package>.]<procedure>[,...])]]> |
| 77 | + </code> |
| 78 | + </snippet> |
| 79 | + <snippet name="rollback" description="Package/procedure level. Defines transaction control. Supported values: auto(default) - a savepoint is created before invocation of each “before block” is and a rollback to specific savepoint is issued after each “after” block; manual - rollback is never issued automatically"> |
| 80 | + <code> |
| 81 | + <![CDATA[--%rollback(<type>)]]> |
| 82 | + </code> |
| 83 | + </snippet> |
| 84 | + <snippet name="disabled" description="Package/procedure level. Used to disable a suite or a test. Disabled suites/tests do not get executed, they are however marked and reported as disabled in a test run."> |
| 85 | + <code> |
| 86 | + <![CDATA[--%disabled]]> |
| 87 | + </code> |
| 88 | + </snippet> |
| 89 | + <snippet name="context" description="Package level. Denotes start of a named context (sub-suite) in a suite package"> |
| 90 | + <code> |
| 91 | + <![CDATA[--%context(<name>)]]> |
| 92 | + </code> |
| 93 | + </snippet> |
| 94 | + <snippet name="endcontext" description="Package level. Denotes end of a nested context (sub-suite) in a suite package"> |
| 95 | + <code> |
| 96 | + <![CDATA[--%endcontext]]> |
| 97 | + </code> |
| 98 | + </snippet> |
| 99 | + <snippet name="tags" description="Package/procedure level. Used to label a test or a suite for purpose of identification"> |
| 100 | + <code> |
| 101 | + <![CDATA[--%tags]]> |
| 102 | + </code> |
| 103 | + </snippet> |
| 104 | + </group> |
| 105 | + <group category="utPLSQL Expectations" language="PLSQL"> |
| 106 | + <snippet name="be_between" description="Validates that the actual value is between the lower and upper bound."> |
| 107 | + <code> |
| 108 | + <![CDATA[ut.expect(n1).to_be_between(n2);]]> |
| 109 | + </code> |
| 110 | + </snippet> |
| 111 | + <snippet name="be_empty" description="Unary matcher that validates if the provided dataset is empty"> |
| 112 | + <code> |
| 113 | + <![CDATA[ut.expect(n).to_be_empty();]]> |
| 114 | + </code> |
| 115 | + </snippet> |
| 116 | + <snippet name="be_false" description="Unary matcher that validates if the provided value is false."> |
| 117 | + <code> |
| 118 | + <![CDATA[ut.expect(n).to_be_false();]]> |
| 119 | + </code> |
| 120 | + </snippet> |
| 121 | + <snippet name="be_greater_or_equal" description="Checks if the actual value is greater or equal than the expected."> |
| 122 | + <code> |
| 123 | + <![CDATA[ut.expect(n1).to_be_greater_or_equal(n2);]]> |
| 124 | + </code> |
| 125 | + </snippet> |
| 126 | + <snippet name="be_greater_than" description="Checks if the actual value is greater than the expected."> |
| 127 | + <code> |
| 128 | + <![CDATA[ut.expect(n1).to_be_greater_than(n2);]]> |
| 129 | + </code> |
| 130 | + </snippet> |
| 131 | + <snippet name="be_less_or_equal" description="Checks if the actual value is less or equal than the expected."> |
| 132 | + <code> |
| 133 | + <![CDATA[ut.expect(n1).to_be_less_or_equal(n2);]]> |
| 134 | + </code> |
| 135 | + </snippet> |
| 136 | + <snippet name="be_less_than" description="Checks if the actual value is less than the expected."> |
| 137 | + <code> |
| 138 | + <![CDATA[ut.expect(n1).to_be_less_than(n2);]]> |
| 139 | + </code> |
| 140 | + </snippet> |
| 141 | + <snippet name="be_like" description="Validates that the actual value is like the expected expression."> |
| 142 | + <code> |
| 143 | + <![CDATA[ut.expect(n1).to_be_like(n2);]]> |
| 144 | + </code> |
| 145 | + </snippet> |
| 146 | + <snippet name="be_not_null" description="Unary matcher that validates if the actual value is not null."> |
| 147 | + <code> |
| 148 | + <![CDATA[ut.expect(n).to_be_not_null();]]> |
| 149 | + </code> |
| 150 | + </snippet> |
| 151 | + <snippet name="be_null" description="Unary matcher that validates if the actual value is null."> |
| 152 | + <code> |
| 153 | + <![CDATA[ut.expect(n).to_be_null();]]> |
| 154 | + </code> |
| 155 | + </snippet> |
| 156 | + <snippet name="be_true" description="Unary matcher that validates if the provided value is true."> |
| 157 | + <code> |
| 158 | + <![CDATA[ut.expect(n).to_be_true();]]> |
| 159 | + </code> |
| 160 | + </snippet> |
| 161 | + <snippet name="have_count" description="Unary matcher that validates if the provided dataset count is equal to expected value."> |
| 162 | + <code> |
| 163 | + <![CDATA[ut.expect(n1).to_have_count(n2);]]> |
| 164 | + </code> |
| 165 | + </snippet> |
| 166 | + <snippet name="match" description="Validates that the actual value is matching the expected regular expression."> |
| 167 | + <code> |
| 168 | + <![CDATA[ut.expect(n1).to_match(n2);]]> |
| 169 | + </code> |
| 170 | + </snippet> |
| 171 | + <snippet name="equal" description="Validate that actual value is equal to expected"> |
| 172 | + <code> |
| 173 | + <![CDATA[ut.expect(n1).to_equal(n2);]]> |
| 174 | + </code> |
| 175 | + </snippet> |
| 176 | + <snippet name="contain" description="This matcher supports only compound data comparison. It check if the give set contain all values from given subset."> |
| 177 | + <code> |
| 178 | + <![CDATA[ut.expect(n1).to_contain(n2);]]> |
| 179 | + </code> |
| 180 | + </snippet> |
| 181 | + <snippet name="not_to_be_empty" description="Unary matcher that validates if the provided dataset is not empty"> |
| 182 | + <code> |
| 183 | + <![CDATA[ut.expect(n).not_to_be_empty();]]> |
| 184 | + </code> |
| 185 | + </snippet> |
| 186 | + <snippet name="not_to_be_false" description="Unary matcher that validates if the provided value is not false."> |
| 187 | + <code> |
| 188 | + <![CDATA[ut.expect(n).not_to_be_false();]]> |
| 189 | + </code> |
| 190 | + </snippet> |
| 191 | + <snippet name="not_to_be_greater_or_equal" description="Checks if the actual value is not greater or equal than the expected."> |
| 192 | + <code> |
| 193 | + <![CDATA[ut.expect(n1).not_to_be_greater_or_equal(n2);]]> |
| 194 | + </code> |
| 195 | + </snippet> |
| 196 | + <snippet name="not_to_be_greater_than" description="Checks if the actual value is not greater than the expected."> |
| 197 | + <code> |
| 198 | + <![CDATA[ut.expect(n1).not_to_be_greater_than(n2);]]> |
| 199 | + </code> |
| 200 | + </snippet> |
| 201 | + <snippet name="not_to_be_less_or_equal" description="Checks if the actual value is not less or equal than the expected."> |
| 202 | + <code> |
| 203 | + <![CDATA[ut.expect(n1).not_to_be_less_or_equal(n2);]]> |
| 204 | + </code> |
| 205 | + </snippet> |
| 206 | + <snippet name="not_to_be_less_than" description="Checks if the actual value is not less than the expected."> |
| 207 | + <code> |
| 208 | + <![CDATA[ut.expect(n1).not_to_be_less_than(n2);]]> |
| 209 | + </code> |
| 210 | + </snippet> |
| 211 | + <snippet name="not_to_be_like" description="Validates that the actual value is not like the expected expression."> |
| 212 | + <code> |
| 213 | + <![CDATA[ut.expect(n1).not_to_be_like(n2);]]> |
| 214 | + </code> |
| 215 | + </snippet> |
| 216 | + <snippet name="not_to_have_count" description="Unary matcher that validates if the provided dataset count is not equal to expected value."> |
| 217 | + <code> |
| 218 | + <![CDATA[ut.expect(n1).not_to_have_count(n2);]]> |
| 219 | + </code> |
| 220 | + </snippet> |
| 221 | + <snippet name="not_to_match" description="Validates that the actual value is not matching the expected regular expression."> |
| 222 | + <code> |
| 223 | + <![CDATA[ut.expect(n1).not_to_match(n2);]]> |
| 224 | + </code> |
| 225 | + </snippet> |
| 226 | + <snippet name="not_to_equal" description="Validate that actual value is not equal to expected"> |
| 227 | + <code> |
| 228 | + <![CDATA[ut.expect(n1).not_to_equal(n2);]]> |
| 229 | + </code> |
| 230 | + </snippet> |
| 231 | + <snippet name="not_to_contain" description="This matcher supports only compound data comparison. It check if the give set not contain all values from given subset."> |
| 232 | + <code> |
| 233 | + <![CDATA[ut.expect(n1).not_to_contain(n2);]]> |
| 234 | + </code> |
| 235 | + </snippet> |
| 236 | + <snippet name=".include" description="Valid only for compound data types. Item, comma separated list of items or table of items to include"> |
| 237 | + <code> |
| 238 | + <![CDATA[.include(n)]]> |
| 239 | + </code> |
| 240 | + </snippet> |
| 241 | + <snippet name=".exclude" description="Valid only for compound data types. Item, comma separated list of items or table of items to exclude"> |
| 242 | + <code> |
| 243 | + <![CDATA[.exclude(n)]]> |
| 244 | + </code> |
| 245 | + </snippet> |
| 246 | + <snippet name=".unordered" description="Valid only for compound data types.ignore order of data sets when comparing data. Default when comparing data-sets with to_contain"> |
| 247 | + <code> |
| 248 | + <![CDATA[.unordered]]> |
| 249 | + </code> |
| 250 | + </snippet> |
| 251 | + <snippet name=".join_by" description="Valid only for compound data types. Item, comma separated list of items or table of items to join by two cursors"> |
| 252 | + <code> |
| 253 | + <![CDATA[.join_by(n)]]> |
| 254 | + </code> |
| 255 | + </snippet> |
| 256 | + <snippet name=".unordered_columns" description="Valid only for compound data types. Ignore the ordering of columns / attributes in compared data-sets. Column/attribute names will be used to identify data to be compared and the position will be ignored."> |
| 257 | + <code> |
| 258 | + <![CDATA[.unordered_columns]]> |
| 259 | + </code> |
| 260 | + </snippet> |
| 261 | + </group> |
| 262 | +</snippets> |
0 commit comments