Skip to content

Commit 9e592f5

Browse files
author
VishwaiOSDev
committed
fix: made some minor changes in unit testing
1 parent f4fc3fb commit 9e592f5

4 files changed

Lines changed: 26 additions & 3 deletions

File tree

Loadify.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
88379936283A19F400DDBA79 /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88379935283A19F400DDBA79 /* Int+Extension.swift */; };
1919
88379938283A1A0F00DDBA79 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88379937283A1A0F00DDBA79 /* String+Extension.swift */; };
2020
88498D4C29A285BE007303B0 /* Logger+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88498D4B29A285BE007303B0 /* Logger+Extension.swift */; };
21+
888BD49B2A784F3900A835C5 /* Detailable+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 888BD49A2A784F3900A835C5 /* Detailable+Extension.swift */; };
2122
888C864B29059F6300E86D85 /* NetworkKit in Frameworks */ = {isa = PBXBuildFile; productRef = 888C864A29059F6300E86D85 /* NetworkKit */; };
2223
889714F82932618200D8B1B7 /* DownloadStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889714F72932618200D8B1B7 /* DownloadStatus.swift */; };
2324
889D520629B9AEDB00F61B1E /* Haptific+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889D520529B9AEDB00F61B1E /* Haptific+Extension.swift */; };
@@ -63,6 +64,7 @@
6364
88379935283A19F400DDBA79 /* Int+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extension.swift"; sourceTree = "<group>"; };
6465
88379937283A1A0F00DDBA79 /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
6566
88498D4B29A285BE007303B0 /* Logger+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Logger+Extension.swift"; sourceTree = "<group>"; };
67+
888BD49A2A784F3900A835C5 /* Detailable+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Detailable+Extension.swift"; sourceTree = "<group>"; };
6668
889714F72932618200D8B1B7 /* DownloadStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DownloadStatus.swift; sourceTree = "<group>"; };
6769
889D520529B9AEDB00F61B1E /* Haptific+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Haptific+Extension.swift"; sourceTree = "<group>"; };
6870
88A729AA28264AD100B5FE61 /* Loadify.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Loadify.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -115,6 +117,7 @@
115117
88DB2C322856F24F0065BBF9 /* ApiTest */,
116118
8832338828560CED00BF38B5 /* InfoTest */,
117119
88DB2C392856FD7C0065BBF9 /* Mock */,
120+
888BD4992A784F2600A835C5 /* Others */,
118121
88DB2C372856F7820065BBF9 /* VideoDetailsResponse.json */,
119122
);
120123
path = LoadifyTests;
@@ -158,6 +161,14 @@
158161
path = InfoTest;
159162
sourceTree = "<group>";
160163
};
164+
888BD4992A784F2600A835C5 /* Others */ = {
165+
isa = PBXGroup;
166+
children = (
167+
888BD49A2A784F3900A835C5 /* Detailable+Extension.swift */,
168+
);
169+
path = Others;
170+
sourceTree = "<group>";
171+
};
161172
88A729A128264AD100B5FE61 = {
162173
isa = PBXGroup;
163174
children = (
@@ -409,6 +420,7 @@
409420
88DB2C362856F2BB0065BBF9 /* Mockable.swift in Sources */,
410421
88DB2C3B2856FDA60065BBF9 /* ApiServiceTest.swift in Sources */,
411422
88083D742855D9D00027BA0D /* VideoInfoTest.swift in Sources */,
423+
888BD49B2A784F3900A835C5 /* Detailable+Extension.swift in Sources */,
412424
);
413425
runOnlyForDeploymentPostprocessing = 0;
414426
};

LoadifyTests/ApiTest/ApiServiceTest.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77

88
import XCTest
9-
import LogKit
109
import NetworkKit
1110
@testable import Loadify
1211

LoadifyTests/Mock/Mockable.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77

88
import Foundation
9-
import LogKit
109

1110
protocol Mockable: AnyObject {
1211
var bundle: Bundle { get }
@@ -28,7 +27,6 @@ extension Mockable {
2827
let decodedObject = try JSONDecoder().decode(T.self, from: data)
2928
return decodedObject
3029
} catch {
31-
Log.error(error)
3230
fatalError("Failed to decode the JSON.")
3331
}
3432
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// Detailable+Extension.swift
3+
// LoadifyTests
4+
//
5+
// Created by Vishweshwaran on 2023-07-31.
6+
//
7+
8+
import Foundation
9+
@testable import Loadify
10+
11+
extension Detailable {
12+
13+
func onDisappear() { }
14+
}

0 commit comments

Comments
 (0)