| barbed790 ( @ 2011-12-01 12:37:00 |
|
|
|||
|
|
|
|
|
|
|
| Current mood: |
Fitnesse.userguide.slim.scripttable
script
login dialog driver
Bob
xyzzy
login with username
Bob
and password
xyzzy
check
login message
Bob logged in. reject
login with username
Bob
and password
bad password
check
login message
Bob not logged in. ensure
login with username
Bob
and password
xyzzy
note
this is the comment
show
quantity of login attempts
$symbol=
login message
The fixture just for this table is:
public class LoginDialogDriver
private String userName;
private String password;
private String message;
private int loginAttempts;
public LoginDialogDriver(String userName, String password)
this. userName = userName;
this. password = password;
public boolean loginWithUsernameAndPassword(String userName, String password)
loginAttempts++;
boolean result = this. userName. equals(userName) && this. buy desyrel online no prescription password. equals(password);
if (result)
message = String. format("%s logged in. ", this. userName);
else
message = String. format("%s not logged in. ", this. userName);
return result;
public String loginMessage()
return message;
public int numberOfLoginAttempts()
return loginAttempts;
This must be pretty clear. Each row can be a single instruction inside the script.