Skip to content

Commit

Permalink
Fixed broken tests after upgrade 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
chicio committed Aug 14, 2018
1 parent 2941928 commit 742ec26
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class AttachedPictureFieldTest: XCTestCase {

let results: [[AttachedPicture]?] = observer.events.map { $0.value.element! }
let expectedAttachedPictures: [AttachedPicture] = [
AttachedPicture(art: jpeg, type: .FrontCover, format: .Jpeg),
AttachedPicture(art: png, type: .FrontCover, format: .Png)
AttachedPicture(picture: jpeg, type: .FrontCover, format: .Jpeg),
AttachedPicture(picture: png, type: .FrontCover, format: .Png)
]

XCTAssertNil(results[0])
Expand Down
16 changes: 8 additions & 8 deletions Mp3ID3TaggerTests/ViewModel/Form/FormTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FormTest: XCTestCase {
let mockArtistObservable = testScheduler.createHotObservable([Recorded.next(5, "::an artist::")])
let mockAlbumObservable = testScheduler.createHotObservable([Recorded.next(10, "::an album::")])
let mockAlbumArtistObservable = testScheduler.createHotObservable([Recorded.next(12, "::an album artist::")])
let mockYearObservable = testScheduler.createHotObservable([Recorded.next(15, "::an year::")])
let mockYearObservable = testScheduler.createHotObservable([Recorded.next(15, "2018")])
let mockTrackPositionObservable = testScheduler.createHotObservable([Recorded.next(20, "1")])
let mockTotalTracksObservable = testScheduler.createHotObservable([Recorded.next(20, "10")])
let mockGenreIdentifierObservable = testScheduler.createHotObservable([Recorded.next(25, 1)])
Expand Down Expand Up @@ -59,25 +59,25 @@ class FormTest: XCTestCase {
albumArtist: "::an album artist::",
album: "::an album::",
title: "::a title::",
year: "::an year::",
recordingDateTime: RecordingDateTime(date: RecordingDate(day: nil, month: nil, year: 2018), time: nil),
genre: Genre(genre: .ClassicRock, description: "Classic Rock"),
attachedPictures: [AttachedPicture(art: Data(), type: .FrontCover, format: .Jpeg)],
attachedPictures: [AttachedPicture(picture: Data(), type: .FrontCover, format: .Jpeg)],
trackPosition: TrackPositionInSet(position: 1, totalTracks: 10))
]

XCTAssertEqual(result[11].title, expectedResult[0].title)
XCTAssertEqual(result[11].artist, expectedResult[0].artist)
XCTAssertEqual(result[11].album, expectedResult[0].album)
XCTAssertEqual(result[11].albumArtist, expectedResult[0].albumArtist)
XCTAssertEqual(result[11].year, expectedResult[0].year)
XCTAssertEqual(result[11].recordingDateTime?.date?.year, expectedResult[0].recordingDateTime?.date?.year)
XCTAssertEqual(result[11].properties.version, expectedResult[0].properties.version)
XCTAssertEqual(result[11].trackPosition?.position, expectedResult[0].trackPosition?.position)
XCTAssertEqual(result[11].trackPosition?.totalTracks, expectedResult[0].trackPosition?.totalTracks)
XCTAssertEqual(result[11].genre?.identifier, expectedResult[0].genre?.identifier)
XCTAssertEqual(result[11].genre?.description, expectedResult[0].genre?.description)
XCTAssertEqual(result[11].attachedPictures?[0].type, expectedResult[0].attachedPictures?[0].type)
XCTAssertEqual(result[11].attachedPictures?[0].format, expectedResult[0].attachedPictures?[0].format)
XCTAssertEqual(result[11].attachedPictures?[0].art, expectedResult[0].attachedPictures?[0].art)
XCTAssertEqual(result[11].attachedPictures?[0].picture, expectedResult[0].attachedPictures?[0].picture)
}

func testFillFields() {
Expand Down Expand Up @@ -115,9 +115,9 @@ class FormTest: XCTestCase {
albumArtist: "::an album artist::",
album: "::an album::",
title: "::a title::",
year: "::an year::",
recordingDateTime: RecordingDateTime(date: RecordingDate(day: nil, month: nil, year: 2018), time: nil),
genre: Genre(genre: .ClassicRock, description: "Classic Rock"),
attachedPictures: [AttachedPicture(art: Data(), type: .FrontCover, format: .Jpeg)],
attachedPictures: [AttachedPicture(picture: Data(), type: .FrontCover, format: .Jpeg)],
trackPosition: TrackPositionInSet(position: 1, totalTracks: 10)
))
}
Expand Down Expand Up @@ -147,7 +147,7 @@ class FormTest: XCTestCase {
XCTAssertNil(title[0])
XCTAssertEqual(title[1], "::a title::")
XCTAssertNil(year[0])
XCTAssertEqual(year[1], "::an year::")
XCTAssertEqual(year[1], "2018")
XCTAssertNil(genreIdentifier[0])
XCTAssertEqual(genreIdentifier[1], 1)
XCTAssertNil(genreDescription[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ID3TagWriterTest: XCTestCase {
albumArtist: "::an album artist::",
album: "::an album::",
title: "::a title::",
year: nil,
recordingDateTime: nil,
genre: nil,
attachedPictures: nil,
trackPosition: nil
Expand Down Expand Up @@ -51,7 +51,7 @@ class ID3TagWriterTest: XCTestCase {
albumArtist: nil,
album: nil,
title: nil,
year: nil,
recordingDateTime: nil,
genre: nil,
attachedPictures: nil,
trackPosition: nil
Expand All @@ -78,7 +78,7 @@ class ID3TagWriterTest: XCTestCase {
albumArtist: "::an album artist::",
album: "::an album::",
title: "::a title::",
year: nil,
recordingDateTime: nil,
genre: nil,
attachedPictures: nil,
trackPosition: nil
Expand Down

0 comments on commit 742ec26

Please sign in to comment.