Skip to content

Commit

Permalink
Add test and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali Ozan CILGA committed Aug 22, 2023
1 parent 58309fd commit 16c9d7d
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Example/Tests/UIButtonBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,14 @@ class UIButtonBuilderTests: XCTestCase {

XCTAssertEqual(button.titleLabel?.font, font)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let button = UIButtonBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(button.translatesAutoresizingMaskIntoConstraints)
}
}

// MARK: - Custom UIButton
Expand Down
8 changes: 8 additions & 0 deletions Example/Tests/UICollectionViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,13 @@ class UICollectionViewBuilderTests: XCTestCase {

XCTAssertEqual(tintColor, collectionView.tintColor)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let collectionView = UICollectionViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(collectionView.translatesAutoresizingMaskIntoConstraints)
}

}
8 changes: 8 additions & 0 deletions Example/Tests/UIImageViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,12 @@ class UIImageViewBuilderTests: XCTestCase {
XCTAssertEqual(heightConstraint.constant, size.height)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let imageView = UIImageViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(imageView.translatesAutoresizingMaskIntoConstraints)
}

}
8 changes: 8 additions & 0 deletions Example/Tests/UILabelBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,12 @@ class UILabelBuilderTests: XCTestCase {
XCTAssertEqual(label.accessibilityIdentifier, accessibilityIdentifier)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let label = UILabelBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(label.translatesAutoresizingMaskIntoConstraints)
}

}
8 changes: 8 additions & 0 deletions Example/Tests/UIScrollViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,12 @@ class UIScrollViewBuilderTests: XCTestCase {

XCTAssertEqual(scrollView.accessibilityIdentifier, accessibilityIdentifier)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let scrollView = UIScrollViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(scrollView.translatesAutoresizingMaskIntoConstraints)
}
}
8 changes: 8 additions & 0 deletions Example/Tests/UIStackViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,12 @@ class UIStackViewBuilderTests: XCTestCase {

XCTAssertTrue(stackView.clipsToBounds)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let stackView = UIStackViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(stackView.translatesAutoresizingMaskIntoConstraints)
}
}
8 changes: 8 additions & 0 deletions Example/Tests/UITableViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,12 @@ class UITableViewBuilderTests: XCTestCase {
}
XCTAssertTrue(isContainsIdentifier)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let tableView = UITableViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(tableView.translatesAutoresizingMaskIntoConstraints)
}
}
8 changes: 8 additions & 0 deletions Example/Tests/UITextFieldBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,12 @@ class UITextFieldBuilderTests: XCTestCase {

XCTAssertEqual(textField.autocapitalizationType, autocapitalizationType)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let textField = UITextFieldBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(textField.translatesAutoresizingMaskIntoConstraints)
}
}
7 changes: 7 additions & 0 deletions Example/Tests/UITextViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,11 @@ class UITextViewBuilderTests: XCTestCase {
XCTAssertEqual(textView.accessibilityIdentifier, accessibilityIdentifier)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let textView = UITextViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(textView.translatesAutoresizingMaskIntoConstraints)
}
}
8 changes: 8 additions & 0 deletions Example/Tests/UIViewBuilderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,12 @@ class UIViewBuilderTests: XCTestCase {
XCTAssertEqual(view.accessibilityIdentifier, accessibilityIdentifier)
}

func testTranslatesAutoresizingMaskIntoConstraints() {
let view = UIViewBuilder()
.translatesAutoresizingMaskIntoConstraints(true)
.build()

XCTAssertTrue(view.translatesAutoresizingMaskIntoConstraints)
}

}
2 changes: 1 addition & 1 deletion MobilliumBuilders.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MobilliumBuilders'
s.version = '1.5.1'
s.version = '1.6.0'
s.summary = 'Builders classes'

s.homepage = 'https://github.com/mobillium/MobilliumBuilders'
Expand Down

0 comments on commit 16c9d7d

Please sign in to comment.