This repository was archived by the owner on Sep 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Test Coverage For Snap Manager Chaining
- Improved Overall Test Coverage - Removed Boilerplate Test Setup into Base class - Found bug where SnapManager would not sync with subsequent SnapManager - Bug crushed thanks to Unit Tests :)
- Loading branch information
Satinder Singh
committed
Apr 15, 2017
1 parent
54aec76
commit db2fe5b
Showing
7 changed files
with
287 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// BaseTestCase.swift | ||
// SnapLayout | ||
// | ||
// Created by Satinder Singh on 4/14/17. | ||
// Copyright © 2017 CocoaPods. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import XCTest | ||
|
||
/// Holds boilerplate properies subclasses may use for testing purposes. | ||
/// Manages view hierarchy of childView and parentView relationship throughout test cases | ||
class BaseTestCase: XCTestCase { | ||
|
||
/// Child View of parent View | ||
let childView = UIView() | ||
|
||
/// Second child view of parent View | ||
let childView2 = UIView() | ||
|
||
/// Parent View of Child View | ||
let parentView = UIView() | ||
|
||
/// View that is neither a parent view nor child view | ||
let view = UIView() | ||
|
||
override func setUp() { | ||
super.setUp() | ||
parentView.addSubview(childView) | ||
parentView.addSubview(childView2) | ||
} | ||
|
||
override func tearDown() { | ||
childView.removeFromSuperview() | ||
childView2.removeFromSuperview() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.