diff --git a/Tests/DeviceModelTests.swift b/Tests/DeviceModelTests.swift index 0276e71..a197159 100644 --- a/Tests/DeviceModelTests.swift +++ b/Tests/DeviceModelTests.swift @@ -136,6 +136,21 @@ class DeviceModelTests: XCTestCase { XCTAssert(deviceModel == .iPhoneXR , "DeviceModel - .iPhoneXR is failing") } + func testDeviceModelIPhone11Pro() { + let deviceModel = DeviceModel(identifier: Identifier("iPhone12,3")) + XCTAssert(deviceModel == .iPhone11Pro , "DeviceModel - .iPhone11Pro is failing") + } + + func testDeviceModelIPhone11ProMax() { + let deviceModel = DeviceModel(identifier: Identifier("iPhone12,5")) + XCTAssert(deviceModel == .iPhone11ProMax , "DeviceModel - .iPhone11ProMax is failing") + } + + func testDeviceModelIPhone11() { + let deviceModel = DeviceModel(identifier: Identifier("iPhone12,1")) + XCTAssert(deviceModel == .iPhone11 , "DeviceModel - .iPhone11 is failing") + } + // MARK: - iPad Device Model tests func testDeviceModelIPadFirstGen() { diff --git a/Tests/IdentifierTests.swift b/Tests/IdentifierTests.swift index 610a55c..63c9a0e 100644 --- a/Tests/IdentifierTests.swift +++ b/Tests/IdentifierTests.swift @@ -90,6 +90,18 @@ class IdentifierTests: XCTestCase { // MARK: - iPhone String Description tests + func testDisplayStringiPhone12v5() { + XCTAssert(Identifier("iPhone12,5").description == "iPhone 11 Pro Max", "iPhone12,5 is failing to produce a common device model string") + } + + func testDisplayStringiPhone12v3() { + XCTAssert(Identifier("iPhone12,3").description == "iPhone 11 Pro", "iPhone12,3 is failing to produce a common device model string") + } + + func testDisplayStringiPhone12v1() { + XCTAssert(Identifier("iPhone12,1").description == "iPhone 11", "iPhone12,1 is failing to produce a common device model string") + } + func testDisplayStringiPhone11v8() { XCTAssert(Identifier("iPhone11,8").description == "iPhone XR", "iPhone11,8 is failing to produce a common device model string") }