Jul 03, 2015
• •
•
•
•
•
•
•
•
1
21
…
21
3
4
5
6
21
3
…
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
te
Test Script
ExecutionProtocol
public class Discount {
// Calculation Discount depending
// on the size of the order
// Business Rules:
// amount < 0: Exception
// 0 <= amount < 100: No discount
// amount > 1000: 5% discount
public double getDiscount(double amount) {
…
}
}
read
write
/*
* @author Rick Mugridge 6/12/2003
* Copyright (c) 2003 Rick Mugridge, University of Auckland, NZ
* Released under the terms of the GNU General Public License version 2 or later.
*/
public class CalculateDiscount
extends fit.ColumnFixture {
public double amount;
public double amount;
private Discount application = new Discount();
public double discount() {
return application.getDiscount(amount);
}
}
–
!define x {1}
!define x {1}
• • • • •
•
• –
• – – –
–
•
•
•
•
•
•
•
•
•
•
•
• –
•
• –
• – – –
•
•
-