Skip to content

Commit 58d8ed9

Browse files
committed
Add unit test for FCLiteImplementation availability
1 parent f793248 commit 58d8ed9

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

StripePaymentSheet/StripePaymentSheet.xcodeproj/project.pbxproj

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
47AD56A9889DF5EFBBA9CEFB /* PollingViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ADE49E72DD5EDA448D12D88 /* PollingViewTests.swift */; };
137137
47B19F96CCEA290541E3B988 /* CardSectionElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D03000A6807B09BFD8E6CB1 /* CardSectionElement.swift */; };
138138
48DA2EFE0944E737B0F197B0 /* OHHTTPStubs in Frameworks */ = {isa = PBXBuildFile; productRef = B2AFFAD776D5F21DF837F1BD /* OHHTTPStubs */; };
139+
4954E9712D96FA0C0061585F /* FCLiteImplementationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4954E9702D96FA0C0061585F /* FCLiteImplementationTests.swift */; };
139140
49803444CD948F1ED28FF021 /* PaymentSheetFormFactory+FormSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1EFF100C589FDFF4D516 /* PaymentSheetFormFactory+FormSpec.swift */; };
140141
498BF1722D92FF6A006E866B /* FCLiteImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 498BF1712D92FF6A006E866B /* FCLiteImplementation.swift */; };
141142
49909A162D8AF9760031EC33 /* FinancialConnectionsLite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49909A152D8AF9760031EC33 /* FinancialConnectionsLite.swift */; };
@@ -581,6 +582,7 @@
581582
45B6DC9BD9183495E5649369 /* LinkAccountService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkAccountService.swift; sourceTree = "<group>"; };
582583
47C5DB8C01BA7137369C8B4D /* TextFieldElement+Card.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextFieldElement+Card.swift"; sourceTree = "<group>"; };
583584
492B254E43F3BB9F9CEAEA06 /* PaymentSheetLoaderStubbedTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentSheetLoaderStubbedTest.swift; sourceTree = "<group>"; };
585+
4954E9702D96FA0C0061585F /* FCLiteImplementationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCLiteImplementationTests.swift; sourceTree = "<group>"; };
584586
498BF1712D92FF6A006E866B /* FCLiteImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCLiteImplementation.swift; sourceTree = "<group>"; };
585587
49909A152D8AF9760031EC33 /* FinancialConnectionsLite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FinancialConnectionsLite.swift; sourceTree = "<group>"; };
586588
49909A1B2D8AFA600031EC33 /* FCLiteApiClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCLiteApiClient.swift; sourceTree = "<group>"; };
@@ -1841,6 +1843,7 @@
18411843
61CBE6672BED97EE005F7FEB /* VerticalSavedPaymentMethodsViewControllerSnapshotTests.swift */,
18421844
619AF0882BF56F9100D1C981 /* VerticalSavedPaymentMethodsViewControllerTests.swift */,
18431845
49909A2D2D8B19800031EC33 /* FCLiteAuthFlowViewControllerTests.swift */,
1846+
4954E9702D96FA0C0061585F /* FCLiteImplementationTests.swift */,
18441847
);
18451848
path = PaymentSheet;
18461849
sourceTree = "<group>";
@@ -2118,6 +2121,7 @@
21182121
619AF0852BF56C5E00D1C981 /* PaymentMethodRowButtonSnapshotTests.swift in Sources */,
21192122
B6CACCA02CBD9A3300682ECE /* EmbeddedPaymentElementTest.swift in Sources */,
21202123
2EC9C94DD8D62E4F4EFC8AB8 /* IntentStatusPollerTest.swift in Sources */,
2124+
4954E9712D96FA0C0061585F /* FCLiteImplementationTests.swift in Sources */,
21212125
ABC3A7CF6D5B21D0C9684A09 /* LinkPopupURLParserTests.swift in Sources */,
21222126
F94F6A157CEB937896B682D4 /* LinkURLGeneratorTests.swift in Sources */,
21232127
10A336F0F2331F22F1A0AC1B /* LinkStubs.swift in Sources */,

StripePaymentSheet/StripePaymentSheet/Source/Internal/FC Lite/FCLiteImplementation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@_spi(STP) import StripeCore
99
import UIKit
1010

11-
/// NOTE: If you change the name of this class, make sure to also change it `FinancialConnectionsSDKAvailability` file.
11+
/// NOTE: If you change the name of this class, make sure to also change it in the `FinancialConnectionsSDKAvailability` file.
1212
@_spi(STP) public class FCLiteImplementation: FinancialConnectionsSDKInterface {
1313
required public init() {}
1414

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// FCLiteImplementationTests.swift
3+
// StripePaymentSheetTests
4+
//
5+
// Created by Mat Schmid on 2025-03-28.
6+
//
7+
8+
@_spi(STP) import StripeCore
9+
import XCTest
10+
11+
class FCLiteImplementationTests: XCTestCase {
12+
func testFCLiteImplementationAvailable() {
13+
let FinancialConnectionsLiteImplementation: FinancialConnectionsSDKInterface.Type? =
14+
NSClassFromString("StripePaymentSheet.FCLiteImplementation")
15+
as? FinancialConnectionsSDKInterface.Type
16+
XCTAssertNotNil(FinancialConnectionsLiteImplementation)
17+
}
18+
}

0 commit comments

Comments
 (0)