Skip to content

Commit

Permalink
Refactor view global functions with static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller committed Apr 5, 2024
1 parent 42fd18b commit 8f89a73
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 213 deletions.
18 changes: 9 additions & 9 deletions Tests/LayoutTests/LayoutExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let subview: UIView = pinkView
let subview: UIView = .pink()

// THEN

Expand All @@ -100,8 +100,8 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let subview1: UIView = pinkView
let subview2: UIView = blueView
let subview1: UIView = .pink()
let subview2: UIView = .blue()

// THEN

Expand All @@ -122,7 +122,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let siblingView: UIView = pinkView
let siblingView: UIView = .pink()

let label: UILabel = {
let label: UILabel = .init()
Expand Down Expand Up @@ -150,7 +150,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let siblingView: UIView = pinkView
let siblingView: UIView = .pink()

let label: UILabel = {
let label: UILabel = .init()
Expand Down Expand Up @@ -180,7 +180,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let subview: UIView = blueView
let subview: UIView = .blue()

// THEN

Expand All @@ -195,7 +195,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let subview1: UIView = orangeView
let subview1: UIView = .orange()
let subview2: UIImageView = .init(image: .checkmark)

// THEN
Expand All @@ -212,7 +212,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let siblingView: UIView = pinkView
let siblingView: UIView = .pink()

let label: UILabel = {
let label: UILabel = .init()
Expand Down Expand Up @@ -240,7 +240,7 @@ final class LayoutExampleTests: XCTestCase {

// GIVEN

let siblingView: UIView = pinkView
let siblingView: UIView = .pink()

let label: UILabel = {
let label: UILabel = .init()
Expand Down
Loading

0 comments on commit 8f89a73

Please sign in to comment.