Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Just one function of my test class to test the logic of my calculator operations
// MARK: Frameworks
import XCTest
// MARK: CalculatorInteractorTests
class CalculatorInteractorTests: XCTestCase {
// MARK: Variables
var calculatorInteractor: CalculatorInteractor!
// MARK: Setup Methods
override func setUp() {
calculatorInteractor = CalculatorInteractor()
// MARK: Addition Tests
func testAddition() {
let numberOne: Float = 4
let numberTwo: Float = 9
let result = calculatorInteractor.add(numberOne: numberOne, to: numberTwo)
XCTAssertEqual(result, 13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment