\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Samuel Nitsche (pesse)} \pdfinfo{ /Title (utplsql-3-1-10.pdf) /Creator (Cheatography) /Author (Samuel Nitsche (pesse)) /Subject (utPLSQL 3.1.10 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{3C7EBD} \definecolor{LightBackground}{HTML}{F2F6FA} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{utPLSQL 3.1.10 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Samuel Nitsche (pesse)} via \textcolor{DarkBackground}{\uline{cheatography.com/125418/cs/24133/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Samuel Nitsche (pesse) \\ \uline{cheatography.com/pesse} \\ \uline{\seqsplit{cleandatabase}.wordpress.com} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 4th September, 2020.\\ Updated 4th September, 2020.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{2} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Define Test Suites with Annotations}} \tn \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{\{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/annotations.html"\}\}Annotations\{\{/link\}\} are single-line comments and belong in the package header. Put a newline between package and procedure annotations.% Row Count 5 (+ 5) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Package Annotations}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{-{}-\%suite}}(description) & Package is a test-suite ({\emph{optional}} description). {\emph{Mandatory}} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} -{}-\%suitepath(org.utplsql) & Groups suites in hierarchical namespaces \tn % Row Count 6 (+ 2) % Row 2 \SetRowColor{LightBackground} -{}-\%rollback(auto|manual) & Automatic ({\emph{default}}) / manual \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/annotations.html\#rollback"\}\}transaction control\{\{/link\}\} \tn % Row Count 14 (+ 8) % Row 3 \SetRowColor{white} {\bf{-{}-\%context}}(description)\{\{nl\}\}-{}-\%endcontext & Starts/ends sub-suite in suite. Can be nested. \tn % Row Count 17 (+ 3) % Row 4 \SetRowColor{LightBackground} -{}-\%disabled & Tests of suite/context won't be executed \tn % Row Count 19 (+ 2) % Row 5 \SetRowColor{white} -{}-\%beforeall(procedure {[}, ...{]})\{\{nl\}\}-{}-\%afterall... & Procedure(s) to run before/after all tests in the suite/context \tn % Row Count 23 (+ 4) % Row 6 \SetRowColor{LightBackground} \{\{nobreak\}\}-{}-\%beforeeach(procedure {[}, ...{]})\{\{nl\}\}-{}-\%aftereach... & Procedure(s) to run before/after each test in the suite/context \tn % Row Count 27 (+ 4) % Row 7 \SetRowColor{white} -{}-\%tags(myTag{[}, ...) & Label a test/context/suite \tn % Row Count 29 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Procedure Annotations}} \tn % Row 0 \SetRowColor{LightBackground} -{}-\%test(description) & Procedure is a test (with optional description) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} -{}-\%disabled & Test won't be executed \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} -{}-\%throws(exception {[}, ...{]}) & Test expects exception(s) to be thrown \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} -{}-\%beforeall, -{}-\%afterall\{\{nl\}\}-{}-\%beforeeach, -{}-\%aftereach & Procedure to run before/after all/each tests in the suite/context \tn % Row Count 11 (+ 4) % Row 4 \SetRowColor{LightBackground} \{\{nobreak\}\}-{}-\%beforetest(procedure {[}, ...{]})\{\{nl\}\}-{}-\%aftertest(procedure {[}, ...{]}) & Procedure(s) to be run before/after annotated test \tn % Row Count 16 (+ 5) % Row 5 \SetRowColor{white} -{}-\%tags(myTag{[}, ...) & Label test \tn % Row Count 17 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.6 cm} x{4.4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Run Tests}} \tn % Row 0 \SetRowColor{LightBackground} `exec ut.run();` & Run all tests to the default reporter (DBMS\_OUTPUT) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `select * from table( ut.run());` & Run all tests and display output as result set \tn % Row Count 6 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Consider using \{\{link="https://github.com/utplsql/utplsql-cli"\}\}utplsql-cli\{\{/link\}\} to easily run tests} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{PDF Column Break}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Run specific tests}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{`ut.run('my\_suite\_pckg')`} & Run only the specified suite by name (current schema) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} `ut.run('HR')` & Run all tests in specific schema \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{`ut.run('my\_suite.test1},\{\{nl\}\}~~my\_suite.test2')` & Run list of items \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} \{\{nobreak\}\}`ut.run(':my.suite.path')` & Run specific suite path \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.76 cm} x{4.24 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Run Parameters}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}`a\_force\_manual\_rollback` & True/False. Run specified test and \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/running-unit-tests.html\#keeping-uncommitted-data-after-test-run"\}\}don't rollback changes\{\{/link\}\} (leaves open transaction) \tn % Row Count 11 (+ 11) % Row 1 \SetRowColor{white} \seqsplit{`a\_random\_test\_order`} & True/False. Run tests in random order \tn % Row Count 13 (+ 2) % Row 2 \SetRowColor{LightBackground} `a\_color\_console` & True/False. Color-code output (for Windows see \{\{link="https://github.com/adoxa/ansicon/releases"\}\}ANSICON\{\{/link\}\}) \tn % Row Count 19 (+ 6) % Row 3 \SetRowColor{white} \seqsplit{`a\_client\_character\_set`} & Define \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/running-unit-tests.html\#reports-character-set-encoding"\}\}report's character-set\{\{/link\}\} \tn % Row Count 27 (+ 8) % Row 4 \SetRowColor{LightBackground} `a\_tags` & Run tests with any \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/running-unit-tests.html\#run-by-tags"\}\}specified tags\{\{/link\}\}.\{\{nl\}\}Use `a\_tags=\textgreater{}'-tag1'` to exclude a tag \tn % Row Count 36 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Reporting: Run alternative Reporter}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{exec \seqsplit{ut.run(ut\_junit\_reporter());}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{4 cm} x{4 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Reporters}} \tn % Row 0 \SetRowColor{LightBackground} \{\{nobreak\}\}{\bf{`UT\_DOCUMENTATION\_REPORTER`}} & Textual pretty-print of test results. {\emph{Default}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \seqsplit{`UT\_COVERAGE\_HTML\_REPORTER`} & HTML Coverage Report, includes SourceCode \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} `UT\_JUNIT\_REPORTER` & Test results conforming to JUnit 4 and above \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \seqsplit{`UT\_REALTIME\_REPORTER`} & Test results and additional information as XML. Allows to show progress information \tn % Row Count 14 (+ 5) % Row 4 \SetRowColor{LightBackground} \seqsplit{`UT\_SONAR\_TEST\_REPORTER`} & JSON Test results designed for SonarQube \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{See \{\{link="https://github.com/utplsql/utplsql-cli\#reporters"\}\}full list\{\{/link\}\} of built-in reporters. See documentation for \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/coverage.html"\}\}coverage\{\{/link\}\} and \{\{link="http://utplsql.org/utPLSQL/v3.1.10/userguide/reporters.html"\}\}reporters\{\{/link\}\}.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{PDF Page Break}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Expectation Syntax}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Base expectation}}\{\{nl\}\}`ut.expect( {\emph{actual\_value}} ).to\_( {\bf{matcher}} );`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Negated expectation}}\{\{nl\}\}`ut.expect( {\emph{actual\_value}} ).not\_to\_( {\bf{matcher}} );`} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Shortcut syntax (recommended)}}\{\{nl\}\}`ut.expect( {\emph{actual\_value}} ).to\_{\bf{matcher}};\{\{nl\}\}ut.expect( {\emph{actual\_value}} ).not\_to\_{\bf{matcher}};`} \tn % Row Count 8 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Provide additional expectation description}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect(1, {\bf{'Additional text'}}).to\_equal(3);`} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Simple Matchers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect(1=1).to\_{\bf{be\_true}}();`} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{`ut.expect(1 is null).to\_{\bf{be\_false}}();`} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect(null).to\_{\bf{be\_null}}();`} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{\seqsplit{`ut.expect(to\_clob('ABC'))}.to\_{\bf{be\_not\_null}}();`} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 3 ).to\_{\bf{be\_between}}( 1, 3 );`} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 3 ).to\_{\bf{be\_greater\_or\_equal}}( 2 );`} \tn % Row Count 7 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 2 ).to\_{\bf{be\_greater\_than}}( 1 );`} \tn % Row Count 9 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 3 ).to\_{\bf{be\_less\_or\_equal}}( 3 );`} \tn % Row Count 11 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 3 ).to\_{\bf{be\_less\_than}}( 4 );`} \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Equality Matchers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{`ut.expect( 'a dog' ).to\_{\bf{equal}}('a dog',\{\{nl\}\}~~a\_nulls\_are\_equal =\textgreater{} false );`\{\{nl\}\}a\_nulls\_are\_equal is {\bf{true}} by default} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal on objects}}\{\{nl\}\}`ut.expect(anydata.convertObject(l\_expect))\{\{nl\}\}~~.to\_equal(anydata.convertObject(l\_actual));`} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{equal on collections}}\{\{nl\}\}`ut.expect(anydata.convertCollection(l\_expect))\{\{nl\}\}~~.to\_equal(anydata.convertCollection(l\_actual));`} \tn % Row Count 9 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{It's not possible to compare rowtypes and records directly. You have to wrap them in a `table of record` , select from them and use cursor comparsion} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{PDF Column Break}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.04 cm} x{4.96 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{Advanced Matchers}} \tn % Row 0 \SetRowColor{LightBackground} be\_like & `ut.expect( 'Lorem\_impsum' )\{\{nl\}\}~~.to\_be\_like( '\%re\%su' );`\{\{nl\}\} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} be\_like\{\{nl\}\}with escape & `ut.expect( 'Lorem\_impsum' )\{\{nl\}\}~~.to\_be\_like(\{\{nl\}\}~~~~a\_mask =\textgreater{} '\%rem\textbackslash{}\_\%',\{\{nl\}\}~~~~a\_escape\_char =\textgreater{} '\textbackslash{}' );`\{\{nl\}\}see \{\{link="https://docs.oracle.com/database/121/SQLRF/conditions007.htm\#SQLRF52141"\}\}Oracle like operator\{\{/link\}\} \tn % Row Count 17 (+ 13) % Row 2 \SetRowColor{LightBackground} match & `ut.expect('some value')\{\{nl\}\}~~.to\_match('\textasciicircum{}some.*');` \tn % Row Count 20 (+ 3) % Row 3 \SetRowColor{white} match\{\{nl\}\}with options & `ut.expect( '123-456-ABcd' )\{\{nl\}\}~~.to\_match(\{\{nl\}\}~~~~a\_pattern=\textgreater{}'\textbackslash{}d\{3\}-\textbackslash{}d\{3\}-{[}a-z{]}',\{\{nl\}\}~~~~a\_modifiers=\textgreater{}'i');`\{\{nl\}\}See \{\{link="https://docs.oracle.com/database/121/SQLRF/conditions007.htm\#SQLRF00501"\}\}regexp\_like function\{\{/link\}\} \tn % Row Count 33 (+ 13) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Cursor Comparison}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Basic example}}\{\{nl\}\}`open l\_expected for select * from all\_objects;\{\{nl\}\}open l\_actual for select * from all\_objects;\{\{nl\}\}ut.expect(l\_actual)\{\{nl\}\}~~.to\_equal(l\_expected)\{\{nl\}\}~~.join\_by('COLUMN\_NAME')\{\{nl\}\}~~.exclude(ut\_varchar2\_list('ID','SOMECOLUMN'))`} \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Special Matchers}}\{\{nl\}\}`ut.expect(l\_actual).to\_{\bf{have\_count}}(5);`\{\{nl\}\}`ut.expect(l\_actual).to\_{\bf{be\_empty}}();`} \tn % Row Count 9 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{8.4cm}}{\bf\textcolor{white}{Helpers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Type: List of strings}}\{\{nl\}\}`ut\_varchar2\_list('String 1', 'String 2', ...)`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{8.4cm}}{{\bf{Type: List of reporters}}\{\{nl\}\}`ut\_reporters(ut\_documentation\_reporter(), ut\_junit\_reporter())`} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{8.4cm}}{{\bf{Select all tests}}\{\{nl\}\}`select * from table(\{\{nl\}\}~~ut\_runner.get\_suites\_info({\emph{USER}}, {\emph{'PACKAGE\_NAME'}}))\{\{nl\}\}~~where item\_type = 'UT\_TEST';`} \tn % Row Count 8 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}