Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yarspirin committed Jul 20, 2023
1 parent d0178b4 commit 81c1019
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Tests/TagCloudTests/TagCloudTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ fileprivate struct Tag {
}

final class TagCloudTests: XCTestCase {
func testFlowLayoutViewCreation() {

func testDefaultTagCloudViewCreation() {
let tagCloudView = TagCloudView(tags: ["Hello", "World", "I", "love", "Swift"])
XCTAssertNotNil(tagCloudView)
}

func testCustomTagCloudViewCreation() {
let tags = (1 ... 5).map { Tag(num: $0) }
let flowLayoutView = TagCloudView(data: tags) { tag in
Text("\(tag.num)")
}
XCTAssertNotNil(flowLayoutView)
}

func testTagCloudViewCreation() {
let tagCloudView = TagCloudView(tags: ["Hello", "World", "I", "love", "Swift"])
XCTAssertNotNil(tagCloudView)
}
}

0 comments on commit 81c1019

Please sign in to comment.