Skip to content

Commit a652ac8

Browse files
Add tests for the title getter and setter of ViewController
1 parent 75ee951 commit a652ac8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/UICoreTests/ViewControllerTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,14 @@ final class ViewControllerTests: XCTestCase {
2828
XCTAssertNotNil(sut.viewIfLoaded)
2929
XCTAssertTrue(sut.isViewLoaded)
3030
}
31+
32+
func testTitleGetterAndSetter() {
33+
let sut = ViewController()
34+
35+
// XCTAssertNil(sut.title) // This is currently failing, but the initial value of `title` should be `nil`
36+
37+
sut.title = "Title"
38+
39+
XCTAssertEqual(sut.title, "Title")
40+
}
3141
}

0 commit comments

Comments
 (0)