From 58b8f1f957f438375b3fea402a22a2f4a47a4bd3 Mon Sep 17 00:00:00 2001 From: Hadi Sharghi Date: Tue, 20 Jun 2023 13:58:36 +0330 Subject: [PATCH 1/2] add test methods --- Tests/VaporWalletTests/XCTestManifests.swift | 30 ++++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Tests/VaporWalletTests/XCTestManifests.swift b/Tests/VaporWalletTests/XCTestManifests.swift index eacff3d..626f4fd 100644 --- a/Tests/VaporWalletTests/XCTestManifests.swift +++ b/Tests/VaporWalletTests/XCTestManifests.swift @@ -1,9 +1,33 @@ import XCTest +extension VaporWalletTests { + static let allTests = [ + ("testAddUser", testAddUser), + ("testAddGame", testAddGame), + ("testUserHasNoDefaultWallet", testUserHasNoDefaultWallet), + ("testUserHasDefaultWallet", testUserHasDefaultWallet), + ("testCreateWallet", testCreateWallet), + ("testWalletDeposit", testWalletDeposit), + ("testWalletTransactionMiddleware", testWalletTransactionMiddleware), + ("testWalletWithdraw", testWalletWithdraw), + ("testWalletCanWithdraw", testWalletCanWithdraw), + ("testWalletCanWithdrawWithMinAllowedBalance", testWalletCanWithdrawWithMinAllowedBalance), + ("testMultiWallet", testMultiWallet), + ("testTransactionMetadata", testTransactionMetadata), + ("testWalletDecimalBalance", testWalletDecimalBalance), + ("testConfirmTransaction", testConfirmTransaction), + ("testConfirmAllTransactionsOfWallet", testConfirmAllTransactionsOfWallet), + ("testTransferBetweenAUsersWallets", testTransferBetweenAUsersWallets), + ("testTransferBetweenTwoUsersWallets", testTransferBetweenTwoUsersWallets), + ("testMultiModelWallet", testMultiModelWallet), + ("testMultiModelWalletTransfer", testMultiModelWalletTransfer), + ] +} + #if !canImport(ObjectiveC) public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(VaporWalletTests.allTests), - ] + return [ + testCase(VaporWalletTests.allTests), + ] } #endif From 6ee3b62a6ec3a5078a6edc354b1a93cb1fa0c3c5 Mon Sep 17 00:00:00 2001 From: Hadi Sharghi Date: Tue, 20 Jun 2023 14:03:02 +0330 Subject: [PATCH 2/2] remove unused Linux Test files --- Tests/LinuxMain.swift | 7 ----- Tests/VaporWalletTests/XCTestManifests.swift | 33 -------------------- 2 files changed, 40 deletions(-) delete mode 100644 Tests/LinuxMain.swift delete mode 100644 Tests/VaporWalletTests/XCTestManifests.swift diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index f7d55bc..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,7 +0,0 @@ -import XCTest - -import VaporWalletTests - -var tests = [XCTestCaseEntry]() -tests += VaporWalletTests.allTests() -XCTMain(tests) diff --git a/Tests/VaporWalletTests/XCTestManifests.swift b/Tests/VaporWalletTests/XCTestManifests.swift deleted file mode 100644 index 626f4fd..0000000 --- a/Tests/VaporWalletTests/XCTestManifests.swift +++ /dev/null @@ -1,33 +0,0 @@ -import XCTest - -extension VaporWalletTests { - static let allTests = [ - ("testAddUser", testAddUser), - ("testAddGame", testAddGame), - ("testUserHasNoDefaultWallet", testUserHasNoDefaultWallet), - ("testUserHasDefaultWallet", testUserHasDefaultWallet), - ("testCreateWallet", testCreateWallet), - ("testWalletDeposit", testWalletDeposit), - ("testWalletTransactionMiddleware", testWalletTransactionMiddleware), - ("testWalletWithdraw", testWalletWithdraw), - ("testWalletCanWithdraw", testWalletCanWithdraw), - ("testWalletCanWithdrawWithMinAllowedBalance", testWalletCanWithdrawWithMinAllowedBalance), - ("testMultiWallet", testMultiWallet), - ("testTransactionMetadata", testTransactionMetadata), - ("testWalletDecimalBalance", testWalletDecimalBalance), - ("testConfirmTransaction", testConfirmTransaction), - ("testConfirmAllTransactionsOfWallet", testConfirmAllTransactionsOfWallet), - ("testTransferBetweenAUsersWallets", testTransferBetweenAUsersWallets), - ("testTransferBetweenTwoUsersWallets", testTransferBetweenTwoUsersWallets), - ("testMultiModelWallet", testMultiModelWallet), - ("testMultiModelWalletTransfer", testMultiModelWalletTransfer), - ] -} - -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(VaporWalletTests.allTests), - ] -} -#endif