English topic guide inspired by the original iOS Developer Notebook, expanded for both iOS and Android teams.
func testCheckoutTotal() {
let total = Checkout.calcTotal(items: [.init(price: 10), .init(price: 5)])
XCTAssertEqual(total, 15)
}
@Test fun checkoutTotal() {
val total = Checkout.calcTotal(listOf(Item(10), Item(5)))
assertEquals(15, total)
}