GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Update code templates using AAA · Issue #145 · utPLSQL/utPLSQL-SQLDeveloper Closed DescriptionThe current code template for the PL/SQL package body looks like this ( CREATE OR REPLACE PACKAGE BODY test_[package_name] IS -- -- test -- PROCEDURE [procedure_name] IS l_actual INTEGER := 0; l_expected INTEGER := 1; BEGIN -- populate actual -- ... -- populate expected -- ... -- assert ut.expect(l_actual).to_equal(l_expected); END [procedure_name]; END test_[package_name]; / The body is grouped into three steps. Firstly, populate actual. Secondly, populate expected. Thirdly, assert. Instead of these three steps the Arrange-Act-Assert pattern should be used. It's popular in Unit testing. The new template should look like this: create or replace package body test_[package_name] is -- -- test -- procedure [procedure_name] is l_actual integer := 0; l_expected integer := 1; begin -- arrange -- ... -- act -- ... -- assert ut.expect(l_actual).to_equal(l_expected); end [procedure_name]; end test_[package_name]; / The other template should be changed accordingly. ActivityMetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |