Adding Unit testing for UIPageControl+Rx
This commit is contained in:
parent
56119d3e91
commit
b384c3e982
|
|
@ -43,6 +43,8 @@
|
|||
84E4D3931C9AFD3500ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
|
||||
84E4D3941C9AFD3600ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
|
||||
84E4D3961C9B011000ADFDC9 /* UISearchController+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */; };
|
||||
914FCD671CCDB82E0058B304 /* UIPageControl+RxTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */; };
|
||||
914FCD681CCDB82E0058B304 /* UIPageControl+RxTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */; };
|
||||
91BE429C1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
91BE429D1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
91BE429F1CBF7F3D00F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
|
|
@ -1351,6 +1353,7 @@
|
|||
84C225A21C33F00B008724EC /* RxTextStorageDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextStorageDelegateProxy.swift; sourceTree = "<group>"; };
|
||||
84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+Rx.swift"; sourceTree = "<group>"; };
|
||||
84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+RxTests.swift"; sourceTree = "<group>"; };
|
||||
914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIPageControl+RxTest.swift"; sourceTree = "<group>"; };
|
||||
91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Rx.swift"; sourceTree = "<group>"; };
|
||||
9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIActivityIndicatorView+Rx.swift"; sourceTree = "<group>"; };
|
||||
A111CE961B91C97C00D0DCEE /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
|
|
@ -2240,6 +2243,7 @@
|
|||
84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */,
|
||||
C8C217D41CB7100E0038A2E6 /* UITableView+RxTests.swift */,
|
||||
C8C217D61CB710200038A2E6 /* UICollectionView+RxTests.swift */,
|
||||
914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */,
|
||||
);
|
||||
path = RxCocoaTests;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -3429,6 +3433,7 @@
|
|||
C83509561C38706E0027C24C /* Observable+ConcurrencyTest.swift in Sources */,
|
||||
C835095A1C38706E0027C24C /* Observable+MultipleTest+Zip.swift in Sources */,
|
||||
C83509621C38706E0027C24C /* QueueTests.swift in Sources */,
|
||||
914FCD671CCDB82E0058B304 /* UIPageControl+RxTest.swift in Sources */,
|
||||
C83509551C38706E0027C24C /* Observable+BlockingTest.swift in Sources */,
|
||||
C83509351C38706E0027C24C /* KVOObservableTests.swift in Sources */,
|
||||
C83509421C38706E0027C24C /* MainThreadPrimitiveHotObservable.swift in Sources */,
|
||||
|
|
@ -3539,6 +3544,7 @@
|
|||
C83509C31C3875220027C24C /* KVOObservableTests.swift in Sources */,
|
||||
C83509F91C38755D0027C24C /* MainSchedulerTests.swift in Sources */,
|
||||
7EDBAEC31C89BCB9006CBE67 /* UITabBarItem+RxTests.swift in Sources */,
|
||||
914FCD681CCDB82E0058B304 /* UIPageControl+RxTest.swift in Sources */,
|
||||
C83509AB1C3874D20027C24C /* XCTest+AllTests.swift in Sources */,
|
||||
C83509C11C3875220027C24C /* Driver+Extensions.swift in Sources */,
|
||||
C83509DD1C38754C0027C24C /* EquatableArray.swift in Sources */,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// UIPageControl+RxTest.swift
|
||||
// Rx
|
||||
//
|
||||
// Created by Francesco Puntillo on 25/04/2016.
|
||||
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
|
||||
//
|
||||
|
||||
#if os(iOS)
|
||||
|
||||
import Foundation
|
||||
|
||||
import RxSwift
|
||||
import RxCocoa
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class UIPageControlTest : RxTest {
|
||||
}
|
||||
|
||||
extension UIPageControlTest {
|
||||
func testPageControl_CurrentPage() {
|
||||
let pageControl = UIPageControl(frame: CGRect.zero)
|
||||
pageControl.numberOfPages = 10
|
||||
Observable.just(5).bindTo(pageControl.rx_currentPage).dispose()
|
||||
XCTAssertTrue(pageControl.currentPage == 5)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue