-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: refactor: add tests for ios MarketDomain
- Loading branch information
Showing
8 changed files
with
62 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
example/ios/TicketmasterIgniteExampleTests/MarketDomainTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// SampleTest.swift | ||
// TicketmasterIgniteExampleTests | ||
// | ||
// Created by justyna zygmunt on 06/12/2024. | ||
// | ||
import XCTest | ||
import Testing | ||
import TicketmasterFoundation | ||
@testable import react_native_ticketmaster_ignite | ||
|
||
class MarketDomainObjectTests: XCTestCase { | ||
let marketDomainObject = MarketDomainObject() | ||
|
||
func testGetMarketDomainReturnsCorrectDomainForUs() { | ||
let domain = marketDomainObject.getMarketDomain(marketDomainConfig: "US") | ||
|
||
XCTAssertEqual(domain, MarketDomain.US, "getMarketDomain should return the correct domain for 'us'.") | ||
} | ||
|
||
func testGetMarketDomainReturnsCorrectDomainForAU() { | ||
let domain = marketDomainObject.getMarketDomain(marketDomainConfig: "AU") | ||
|
||
XCTAssertEqual(domain, MarketDomain.AU, "getMarketDomain should return the correct domain for 'AU'.") | ||
} | ||
|
||
func testGetMarketDomainReturnsCorrectDomainWhenEmptyStringPassed() { | ||
let domain = marketDomainObject.getMarketDomain(marketDomainConfig: "") | ||
|
||
XCTAssertEqual(domain, MarketDomain.US, "getMarketDomain should return US domain for empty strings.") | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
example/ios/TicketmasterIgniteExampleTests/TicketmasterIgniteExampleTests-Bridging-Header.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to expose to Swift. | ||
// | ||
|
66 changes: 0 additions & 66 deletions
66
example/ios/TicketmasterIgniteExampleTests/TicketmasterIgniteExampleTests.m
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters