Skip to content

Commit

Permalink
Update UTs names
Browse files Browse the repository at this point in the history
  • Loading branch information
richherrera committed Jul 2, 2024
1 parent fcc1931 commit 8a45508
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions UnitTests/BraintreeCoreTests/ConfigurationLoader_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ConfigurationLoader_Tests: XCTestCase {
super.tearDown()
}

func testFetchOrReturnRemoteConfiguration_whenCached_returnsConfigFromCache() {
func testGetConfig_whenCached_returnsConfigFromCache() {
let sampleJSON = ["test": "value", "environment": "fake-env1"]
try? ConfigurationCache.shared.putInCache(authorization: "development_tokenization_key", configuration: BTConfiguration(json: BTJSON(value: sampleJSON)))
let mockClientAuthorization = MockClientAuthorization(bearer: "development_tokenization_key")
Expand All @@ -35,7 +35,7 @@ class ConfigurationLoader_Tests: XCTestCase {
waitForExpectations(timeout: 1)
}

func testFetchOrReturnRemoteConfiguration_performsGETWithCorrectPayload() {
func testGetConfig_performsGETWithCorrectPayload() {
mockHTTP.stubRequest(withMethod: "GET", toEndpoint: "/v1/configuration", respondWith: [] as [Any?], statusCode: 200)
let mockClientAuthorization = MockClientAuthorization()

Expand All @@ -49,7 +49,7 @@ class ConfigurationLoader_Tests: XCTestCase {
waitForExpectations(timeout: 1)
}

func testAPIClient_canGetRemoteConfiguration() {
func testGetConfig_canGetRemoteConfiguration() {
mockHTTP.cannedConfiguration = BTJSON(value: ["test": true])
mockHTTP.cannedStatusCode = 200
let mockClientAuthorization = MockClientAuthorization()
Expand All @@ -68,7 +68,7 @@ class ConfigurationLoader_Tests: XCTestCase {
waitForExpectations(timeout: 1)
}

func testConfiguration_whenServerRespondsWithNon200StatusCode_returnsAPIClientError() {
func testGetConfig_whenServerRespondsWithNon200StatusCode_returnsAPIClientError() {
mockHTTP.stubRequest(
withMethod: "GET",
toEndpoint: "/client_api/v1/configuration",
Expand All @@ -90,7 +90,7 @@ class ConfigurationLoader_Tests: XCTestCase {
waitForExpectations(timeout: 1)
}

func testConfiguration_whenNetworkHasError_returnsNetworkErrorInCallback() {
func testGetConfig_whenNetworkHasError_returnsNetworkErrorInCallback() {
ConfigurationCache.shared.cacheInstance.removeAllObjects()
let mockError: NSError = NSError(domain: NSURLErrorDomain, code: NSURLErrorCannotConnectToHost)
let mockClientAuthorization = MockClientAuthorization()
Expand Down

0 comments on commit 8a45508

Please sign in to comment.