Created
November 20, 2020 04:52
-
-
Save brunomunizaf/26668cefc7ff4b8a8c3b2faef3dfd9ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCTest | |
@testable import DataBindings | |
final class DataBindingsTests: XCTestCase { | |
var sut: ViewModel! | |
override func setUp() { | |
sut = ViewModel() | |
} | |
func test_Increment() { | |
var value: Int! | |
sut.countBox.bind { value = $0 } | |
sut.increment() | |
XCTAssertEqual(value, 1) | |
} | |
func test_Decrement() { | |
var value: Int! | |
sut.countBox.bind { value = $0 } | |
sut.decrement() | |
XCTAssertEqual(value, -1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment