@@ -34,7 +34,7 @@ class BlogPresenterTests: XCTestCase {
3434 basicContainer. services. register ( LongPostDateFormatter . self)
3535 basicContainer. services. register ( NumericPostDateFormatter . self)
3636 viewRenderer = CapturingViewRenderer ( worker: basicContainer)
37- testTag = try ! BlogTag ( id: 1 , name: " Tattoine " )
37+ testTag = BlogTag ( id: 1 , name: " Tattoine " )
3838 }
3939
4040 override func tearDown( ) {
@@ -46,7 +46,7 @@ class BlogPresenterTests: XCTestCase {
4646 // MARK: - All Tags Page
4747
4848 func testParametersAreSetCorrectlyOnAllTagsPage( ) throws {
49- let tags = try [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
49+ let tags = [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
5050
5151 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL)
5252 _ = presenter. allTagsView ( on: basicContainer, tags: tags, tagPostCounts: [ : ] , pageInformation: pageInformation)
@@ -66,8 +66,8 @@ class BlogPresenterTests: XCTestCase {
6666 }
6767
6868 func testTagsPageGetsPassedTagsSortedByPostCount( ) throws {
69- let tag1 = try BlogTag ( id: 0 , name: " Engineering " )
70- let tag2 = try BlogTag ( id: 1 , name: " Tech " )
69+ let tag1 = BlogTag ( id: 0 , name: " Engineering " )
70+ let tag2 = BlogTag ( id: 1 , name: " Tech " )
7171 let tags = [ tag1, tag2]
7272 let tagPostCount = [ 0 : 5 , 1 : 20 ]
7373 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL)
@@ -81,8 +81,8 @@ class BlogPresenterTests: XCTestCase {
8181 }
8282
8383 func testTagsPageHandlesNoPostsForTagsCorrectly( ) throws {
84- let tag1 = try BlogTag ( id: 0 , name: " Engineering " )
85- let tag2 = try BlogTag ( id: 1 , name: " Tech " )
84+ let tag1 = BlogTag ( id: 0 , name: " Engineering " )
85+ let tag2 = BlogTag ( id: 1 , name: " Tech " )
8686 let tags = [ tag1, tag2]
8787 let tagPostCount = [ 0 : 0 , 1 : 20 ]
8888 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL)
@@ -94,7 +94,7 @@ class BlogPresenterTests: XCTestCase {
9494 }
9595
9696 func testTwitterHandleNotSetOnAllTagsPageIfNotGiven( ) throws {
97- let tags = try [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
97+ let tags = [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
9898 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL, siteTwitterHandle: nil )
9999 _ = presenter. allTagsView ( on: basicContainer, tags: tags, tagPostCounts: [ : ] , pageInformation: pageInformation)
100100
@@ -103,7 +103,7 @@ class BlogPresenterTests: XCTestCase {
103103 }
104104
105105 func testDisqusNameNotSetOnAllTagsPageIfNotGiven( ) throws {
106- let tags = try [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
106+ let tags = [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
107107 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL, disqusName: nil )
108108 _ = presenter. allTagsView ( on: basicContainer, tags: tags, tagPostCounts: [ : ] , pageInformation: pageInformation)
109109
@@ -112,7 +112,7 @@ class BlogPresenterTests: XCTestCase {
112112 }
113113
114114 func testGAIdentifierNotSetOnAllTagsPageIfNotGiven( ) throws {
115- let tags = try [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
115+ let tags = [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
116116 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL, googleAnalyticsIdentifier: nil )
117117 _ = presenter. allTagsView ( on: basicContainer, tags: tags, tagPostCounts: [ : ] , pageInformation: pageInformation)
118118
@@ -121,7 +121,7 @@ class BlogPresenterTests: XCTestCase {
121121 }
122122
123123 func testLoggedInUserSetOnAllTagsPageIfPassedIn( ) throws {
124- let tags = try [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
124+ let tags = [ BlogTag ( id: 0 , name: " tag1 " ) , BlogTag ( id: 1 , name: " tag2 " ) ]
125125 let user = TestDataBuilder . anyUser ( )
126126 let pageInformation = buildPageInformation ( currentPageURL: allTagsURL, user: user)
127127 _ = presenter. allTagsView ( on: basicContainer, tags: tags, tagPostCounts: [ : ] , pageInformation: pageInformation)
@@ -295,8 +295,8 @@ class BlogPresenterTests: XCTestCase {
295295 post. blogID = 1
296296 let post2 = try TestDataBuilder . anyPost ( author: author2, title: " Another Title " )
297297 post2. blogID = 2
298- let tag1 = try BlogTag ( id: 1 , name: " Engineering " )
299- let tag2 = try BlogTag ( id: 2 , name: " Fun " )
298+ let tag1 = BlogTag ( id: 1 , name: " Engineering " )
299+ let tag2 = BlogTag ( id: 2 , name: " Fun " )
300300 let tags = [ tag1, tag2]
301301 let currentPage = 2
302302 let totalPages = 10
0 commit comments