Last active
July 29, 2020 17:36
-
-
Save peteranny/72caa001a1ba283caa1529cc09323455 to your computer and use it in GitHub Desktop.
An example test case for a framework. https://medium.com/better-programming/ios-build-your-cocoapods-framework-with-an-example-app-from-scratch-fd0f7bdf3f8c
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 HelloWorldSDK | |
class HelloWorldSDKTests: XCTestCase { | |
func testHelloWorld() { | |
let hw = HelloWorld() | |
// test public method | |
XCTAssertEqual(hw.hello(to: "World"), "Hello World") | |
// test internal property | |
XCTAssertEqual(hw.greet, "Hello") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment