XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift in xcfit-0.8.0 vs XCFit_Templates/XCFit/Base Acceptance Tests.xctemplate/FixtureExample.swift in xcfit-0.9.0
- old
+ new
@@ -1,9 +1,5 @@
-//
-// Copyright © 2015 stringerstheory. All rights reserved.
-//
-
import Foundation
@objc(FixtureExample)
class FixtureExample : NSObject, SlimDecisionTable {
@@ -14,18 +10,26 @@
//MARK: <SlimDecisionTable>
func execute() {
// 1. Prepare a System Under Test (SUT) using the given inputs.
- // e.g. let system = System(input: foo)
- // 2. Run your SUT and prepare to return outputs.
+ // e.g. let system = MySystemUnderTestContext(input: input)
+ // 2. Run your SUT
+ // 3. Take values from the SUT and return via outputs
}
//MARK: Outputs
- var output: NSString {
+ var output: NSString? {
get {
- return ""
+ switch input {
+ case "foo":
+ return "bar"
+ case "bar":
+ return "baz"
+ default:
+ return nil
+ }
}
}
}
\ No newline at end of file