transcendental-lisp/fitnesse/FitNesseRoot/FitNesse/SuiteAcceptanceTests/SuiteSlimTests/HybridDecisionTable/ImplementDynamicDecisionTab.../content.txt

35 lines
1.1 KiB
Plaintext
Raw Normal View History

|import |
|fitnesse.slim.test|
!3 The Dynamic Decision Table is just a special case of the Hybrid Decision table.
With the following rules for getter and setter the behavior of Dynamic Decision Tables is achieved.
!define SLIM_DT_GETTER (!-
{
"FormatVersion":"1.0",
"MethodExtractorRules":[
{
"Scope":".+",
"TargetName":"get",
"Parameters":"$0"
}
]
}
-!)
!define SLIM_DT_SETTER (!-
{
"FormatVersion":"1.0",
"MethodExtractorRules":[
{
"Scope":".+",
"TargetName":"set",
"Parameters":"$0"
}
]
}
-!)
|dt: add up change |
|# description |1c |5c|10c|25c|50c|$1|total cents?|$ total? |
|some simple addition |2 |2 |4 |0 |0 |0 |52 |0.52 |
|save the total cents in a symbol |56 |0 |0 |0 |1 |20|$totalCents=|21.06 |
|now use the total cents that were stored|$totalCents|0 |0 |0 |0 |10|3106 |~=31.1|An example for Value Comparisons|