daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Dec 12th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Foundation
  2. @testable import Shopify_POS
  3.  
  4. class CustomerEntryViewModelTests: XCTestCase {
  5.     var viewModel: CustomerEntryViewModel!
  6.    
  7.     override func setUp() {
  8.         super.setUp()
  9.         viewModel = CustomerEntryViewModel(/* mock properties */)
  10.     }
  11.  
  12.     func testTaxExemptIsFalseByDefault() {
  13.         XCTAssertFalse(viewModel.taxExempt)
  14.     }
  15.  
  16.     func testIsValidReturnsFalseForInvalidPhone() {
  17.         viewModel.firstName = "First Name"
  18.         viewModel.phone = "9820"
  19.         XCTAssertFalse(viewModel.isValid)
  20.         viewModel.phone = "9028025170"
  21.         XCTAssertTrue(viewModel.isValid)
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top