Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Fitnesse uses Series 5

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Script table

Let's say that the tables introduced above are all single-step, single-method. Script table is a series of multi-step operations, as the name represents.

The first cell of the header is prefixed with script, or it can be just a script, followed by a cell as the class name. Followed by construction parameters. Each of the following lines represents an operation. The types of operations allowed are: executing methods, checking results, and displaying output.

The execution method includes the method name and parameters. The rather bizarre design is that the method name can be interlaced with parameters into the table. As in my example below, this is a method in code is combined from columns 1, 3, and 5, while columns 2, 4, and 6 are parameters. It is more customary to write it in another way-put the square name in the first column (followed by one;), followed by the parameters in turn.

The check result uses four phrases as the content of the first column: check, check not, ensure, and reject, respectively, indicating that the result returned is the same as the table content, different from the table content, returned true, and returned false.

Display the output with the show word, in the first column, followed by the method name and parameters. This line shows only the output without validation. So there will be an extra column in the result table.

Example:

Script:script.zjc.com.ScriptDemo

Zjc

twenty

This is

ten

A method

twenty

In code

thirty

Check

Get age

eighty

This is a method in code

fifteen

twenty-five

thirty-five

Check not

Get age

two hundred

Show

Get name

five

Reject

Reject method

five

Fixture:

Package script.zjc.com;public class ScriptDemo {private String name; private int age; public ScriptDemo (String name,int age) {this.name=name; this.age=age;} public void thisIsAMethodInCode (int a minint bpenint c) {age=age+a+b+c;} public int getAge () {return age } public String getName (int a) {return name;} public boolean rejectMethod (int a) {return false;}}

In my opinion, script table and decision table are the two most important tables. Decision table can do most of the data validation, while script table can be used in conjunction with other tools to achieve a lot of wonderful and unexpected features.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report