From 7325eb17fe43ff27b8a132423b4767e9d4101496 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Thu, 5 Sep 2024 07:57:44 -0500 Subject: [PATCH] Removed LocationPrecision --- .../ConfigurationAndTargeting/Targeting.swift | 13 --------- .../Utilities/UtilitiesForTesting.swift | 2 -- PrebidMobileTests/TargetingObjCTests.m | 28 ------------------- PrebidMobileTests/TargetingTests.swift | 13 --------- 4 files changed, 56 deletions(-) diff --git a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift index 8d46e5333..1b01c1879 100644 --- a/PrebidMobile/ConfigurationAndTargeting/Targeting.swift +++ b/PrebidMobile/ConfigurationAndTargeting/Targeting.swift @@ -307,19 +307,6 @@ public class Targeting: NSObject { */ public var location: CLLocation? - /** - * The application location precision for targeting - */ - public var locationPrecision: Int? - - public func setLocationPrecision(_ newValue: NSNumber?) { - locationPrecision = newValue?.intValue - } - - public func getLocationPrecision() -> NSNumber? { - return locationPrecision as NSNumber? - } - // MARK: - Location and connection information /** diff --git a/PrebidMobileTests/RenderingTests/Utilities/UtilitiesForTesting.swift b/PrebidMobileTests/RenderingTests/Utilities/UtilitiesForTesting.swift index 42030bb5a..2df071fd7 100644 --- a/PrebidMobileTests/RenderingTests/Utilities/UtilitiesForTesting.swift +++ b/PrebidMobileTests/RenderingTests/Utilities/UtilitiesForTesting.swift @@ -290,7 +290,6 @@ typealias JsonDictionary = [String:Any] targeting.userExt = nil targeting.eids = nil targeting.location = nil - targeting.locationPrecision = nil targeting.sourceapp = nil targeting.storeURL = nil targeting.domain = nil @@ -331,7 +330,6 @@ typealias JsonDictionary = [String:Any] XCTAssertNil(targeting.userExt) XCTAssertNil(targeting.eids) XCTAssertNil(targeting.location) - XCTAssertNil(targeting.locationPrecision) XCTAssertNil(targeting.sourceapp) XCTAssertNil(targeting.storeURL) XCTAssertNil(targeting.domain) diff --git a/PrebidMobileTests/TargetingObjCTests.m b/PrebidMobileTests/TargetingObjCTests.m index ce2ccd73c..5ed21852b 100644 --- a/PrebidMobileTests/TargetingObjCTests.m +++ b/PrebidMobileTests/TargetingObjCTests.m @@ -123,34 +123,6 @@ - (void)testLocation { } -- (void)testLocationPrecision { - //given - NSNumber *locationPrecision1 = @1; - int locationPrecision2 = 2; - NSNumber *locationPrecision3 = @3; - NSNumber *locationPrecision4 = nil; - - //when - [Targeting.shared setLocationPrecision: locationPrecision1]; - NSNumber *result1 = [Targeting.shared getLocationPrecision]; - - [Targeting.shared setLocationPrecision: [NSNumber numberWithInt:locationPrecision2]]; - int result2 = [[Targeting.shared getLocationPrecision] intValue]; - - [Targeting.shared setLocationPrecision: locationPrecision3]; - int result3 = [[Targeting.shared getLocationPrecision] intValue]; - - [Targeting.shared setLocationPrecision: locationPrecision4]; - NSNumber *result4 = [Targeting.shared getLocationPrecision]; - - //then - XCTAssertEqualObjects(locationPrecision1, result1); - XCTAssertEqual(locationPrecision2, result2); - XCTAssertEqual(3, result3); - XCTAssertNil(result4); - -} - // MARK: - Year Of Birth - (void)testYearOfBirth { //given diff --git a/PrebidMobileTests/TargetingTests.swift b/PrebidMobileTests/TargetingTests.swift index 01c1b6d57..be35f17c5 100644 --- a/PrebidMobileTests/TargetingTests.swift +++ b/PrebidMobileTests/TargetingTests.swift @@ -104,22 +104,9 @@ class TargetingTests: XCTestCase { //when Targeting.shared.location = location - Targeting.shared.locationPrecision = 2 //then XCTAssertEqual(location, Targeting.shared.location) - XCTAssertEqual(2, Targeting.shared.locationPrecision) - } - - func testLocationPrecision() { - //given - let locationPrecision = 2 - - //when - Targeting.shared.locationPrecision = locationPrecision - - //then - XCTAssertEqual(locationPrecision, Targeting.shared.locationPrecision) } // MARK: - Year Of Birth