Skip to content

Instantly share code, notes, and snippets.

@Gocrazy
Created August 24, 2018 13:36
Show Gist options
  • Select an option

  • Save Gocrazy/2628137d204e63b6f52d61d16db04383 to your computer and use it in GitHub Desktop.

Select an option

Save Gocrazy/2628137d204e63b6f52d61d16db04383 to your computer and use it in GitHub Desktop.
import Foundation
import XCTest
struct TodoItem {
let title: String
let dueBy: Date?
init(title: String) {
self.title = title
self.dueBy = nil
}
}
class TodoTests: XCTestCase {
override func setUp() {
super.setUp()
}
override func tearDown() {
super.tearDown()
}
func testTodo() {
let taskTitle = "finish laundry"
let todo = TodoItem(title: taskTitle)
XCTAssertEqual(todo.title, taskTitle)
}
}
TodoTests.defaultTestSuite.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment