Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- @testable import Shopify_POS
- class CustomerEntryViewModelTests: XCTestCase {
- var viewModel: CustomerEntryViewModel!
- override func setUp() {
- super.setUp()
- viewModel = CustomerEntryViewModel(/* mock properties */)
- }
- func testTaxExemptIsFalseByDefault() {
- XCTAssertFalse(viewModel.taxExempt)
- }
- func testIsValidReturnsFalseForInvalidPhone() {
- viewModel.firstName = "First Name"
- viewModel.phone = "9820"
- XCTAssertFalse(viewModel.isValid)
- viewModel.phone = "9028025170"
- XCTAssertTrue(viewModel.isValid)
- }
- }
Add Comment
Please, Sign In to add comment