Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update code templates using AAA #145

Closed
Assignees
PhilippSalvisberg
Milestone
@PhilippSalvisberg

Description

@PhilippSalvisberg

The current code template for the PL/SQL package body looks like this (test_ is the default prefix):

CREATEOR REPLACE PACKAGE BODY test_[package_name] IS---- test--   PROCEDURE [procedure_name] IS      l_actualINTEGER :=0;      l_expectedINTEGER :=1;BEGIN-- populate actual-- ...-- populate expected-- ...-- assertut.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 theArrange-Act-Assert pattern should be used. It's popular in Unit testing.

The new template should look like this:

createor replace package body test_[package_name] is---- test--   procedure [procedure_name] is      l_actualinteger :=0;      l_expectedinteger :=1;begin-- arrange-- ...-- act-- ...-- assertut.expect(l_actual).to_equal(l_expected);   end [procedure_name];end test_[package_name];/

The other template should be changed accordingly.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp