You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GLTableCollectionViewTests/GLTableCollectionViewTests.swift
+18-7Lines changed: 18 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -49,12 +49,12 @@ class GLTableCollectionViewTests: XCTestCase {
49
49
// MARK: <GLTableCollectionViewController>
50
50
51
51
func testInstanceVariables(){
52
-
XCTAssertGreaterThan(tableCollectionView.numberOfSections,0,"UITableView must have at least one section")
53
-
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionsForRow,0,"There must be at least a GLIndexedCollectionView per UITableViewCell")
54
-
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionItems,0,"There must be at least one GLIndexedCollectionViewCell")
55
-
XCTAssertNotEqual(tableCollectionView.tableCellID,"","The cellIdentifier for the UITableViewCells must not be empty")
56
-
XCTAssertTrue(tableCollectionView.tableCellID.hasSuffix("_section_#"),"The cellIdentifier for the UITableViewCells must end with section number suffix")
57
-
XCTAssertTrue((tableCollectionView.tableCellID.components(separatedBy:"#").count -1)==1,"The cellIdentifier for the UITableViewCells must contain only one # in it")
52
+
XCTAssertGreaterThan(tableCollectionView.numberOfSections,0,"numberOfSections was: \(tableCollectionView.numberOfSections)\nUITableView must have at least one section")
53
+
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionsForRow,0,"numberOfCollectionsForRow was: \(tableCollectionView.numberOfCollectionsForRow)\nThere must be at least a GLIndexedCollectionView per UITableViewCell")
54
+
XCTAssertGreaterThan(tableCollectionView.numberOfCollectionItems,0,"numberOfCollectionItems was: \(tableCollectionView.numberOfCollectionItems)\nThere must be at least one GLIndexedCollectionViewCell")
55
+
XCTAssertNotEqual(tableCollectionView.tableCellID,"","tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must not be empty")
56
+
XCTAssertTrue(tableCollectionView.tableCellID.hasSuffix("_section_#"),"tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must end with section number suffix")
57
+
XCTAssertTrue((tableCollectionView.tableCellID.components(separatedBy:"#").count -1)==1,"tableCellID was: \(tableCollectionView.tableCellID)\nUITableViewCell's cellIdentifier must contain only one # in it")
58
58
XCTAssertNotEqual(tableCollectionView.collectionCellID,"","The cellIdentifier for the UICollectionCells should not be empty")
59
59
}
60
60
@@ -90,7 +90,7 @@ class GLTableCollectionViewTests: XCTestCase {
90
90
XCTAssertGreaterThan(visibleCells.count,0,"UITableView visible cells must be greater than 0")
XCTAssertTrue(Int(tableViewCell.reuseIdentifier!.components(separatedBy:"#").last!)! >=0,"The GLCollectionTableViewCell cellIdentifier must end with a positive integer")
93
+
XCTAssertTrue(Int(tableViewCell.reuseIdentifier!.components(separatedBy:"#").last!)! >=0,"GLCollectionTableViewCell cellIdentifier was: \(tableViewCell.reuseIdentifier)\nGLCollectionTableViewCell's cellIdentifier must end with a positive integer")
94
94
}
95
95
}
96
96
@@ -115,6 +115,17 @@ class GLTableCollectionViewTests: XCTestCase {
115
115
}
116
116
}
117
117
118
+
func testCollectionViewPaginationConsistency(){
119
+
XCTAssertGreaterThan(visibleCells.count,0,"UITableView visible cells must be greater than 0")
if collectionTableCell.collectionViewPaginatedScroll ==true{
123
+
XCTAssertTrue(collectionTableCell.collectionView.isScrollEnabled,"If custom paginated scroll is enabled the UICollectionView should be scrollable")
124
+
XCTAssertTrue(collectionTableCell.collectionView.isUserInteractionEnabled,"If custom paginated scroll is enabled the UICollectionView shoud be user interactive")
0 commit comments