@@ -23,7 +23,7 @@ class FormTest: XCTestCase {
2323 let mockArtistObservable = testScheduler. createHotObservable ( [ Recorded . next ( 5 , " ::an artist:: " ) ] )
2424 let mockAlbumObservable = testScheduler. createHotObservable ( [ Recorded . next ( 10 , " ::an album:: " ) ] )
2525 let mockAlbumArtistObservable = testScheduler. createHotObservable ( [ Recorded . next ( 12 , " ::an album artist:: " ) ] )
26- let mockYearObservable = testScheduler. createHotObservable ( [ Recorded . next ( 15 , " ::an year:: " ) ] )
26+ let mockYearObservable = testScheduler. createHotObservable ( [ Recorded . next ( 15 , " 2018 " ) ] )
2727 let mockTrackPositionObservable = testScheduler. createHotObservable ( [ Recorded . next ( 20 , " 1 " ) ] )
2828 let mockTotalTracksObservable = testScheduler. createHotObservable ( [ Recorded . next ( 20 , " 10 " ) ] )
2929 let mockGenreIdentifierObservable = testScheduler. createHotObservable ( [ Recorded . next ( 25 , 1 ) ] )
@@ -59,25 +59,25 @@ class FormTest: XCTestCase {
5959 albumArtist: " ::an album artist:: " ,
6060 album: " ::an album:: " ,
6161 title: " ::a title:: " ,
62- year : " ::an year:: " ,
62+ recordingDateTime : RecordingDateTime ( date : RecordingDate ( day : nil , month : nil , year: 2018 ) , time : nil ) ,
6363 genre: Genre ( genre: . ClassicRock, description: " Classic Rock " ) ,
64- attachedPictures: [ AttachedPicture ( art : Data ( ) , type: . FrontCover, format: . Jpeg) ] ,
64+ attachedPictures: [ AttachedPicture ( picture : Data ( ) , type: . FrontCover, format: . Jpeg) ] ,
6565 trackPosition: TrackPositionInSet ( position: 1 , totalTracks: 10 ) )
6666 ]
6767
6868 XCTAssertEqual ( result [ 11 ] . title, expectedResult [ 0 ] . title)
6969 XCTAssertEqual ( result [ 11 ] . artist, expectedResult [ 0 ] . artist)
7070 XCTAssertEqual ( result [ 11 ] . album, expectedResult [ 0 ] . album)
7171 XCTAssertEqual ( result [ 11 ] . albumArtist, expectedResult [ 0 ] . albumArtist)
72- XCTAssertEqual ( result [ 11 ] . year, expectedResult [ 0 ] . year)
72+ XCTAssertEqual ( result [ 11 ] . recordingDateTime ? . date ? . year, expectedResult [ 0 ] . recordingDateTime ? . date ? . year)
7373 XCTAssertEqual ( result [ 11 ] . properties. version, expectedResult [ 0 ] . properties. version)
7474 XCTAssertEqual ( result [ 11 ] . trackPosition? . position, expectedResult [ 0 ] . trackPosition? . position)
7575 XCTAssertEqual ( result [ 11 ] . trackPosition? . totalTracks, expectedResult [ 0 ] . trackPosition? . totalTracks)
7676 XCTAssertEqual ( result [ 11 ] . genre? . identifier, expectedResult [ 0 ] . genre? . identifier)
7777 XCTAssertEqual ( result [ 11 ] . genre? . description, expectedResult [ 0 ] . genre? . description)
7878 XCTAssertEqual ( result [ 11 ] . attachedPictures ? [ 0 ] . type, expectedResult [ 0 ] . attachedPictures ? [ 0 ] . type)
7979 XCTAssertEqual ( result [ 11 ] . attachedPictures ? [ 0 ] . format, expectedResult [ 0 ] . attachedPictures ? [ 0 ] . format)
80- XCTAssertEqual ( result [ 11 ] . attachedPictures ? [ 0 ] . art , expectedResult [ 0 ] . attachedPictures ? [ 0 ] . art )
80+ XCTAssertEqual ( result [ 11 ] . attachedPictures ? [ 0 ] . picture , expectedResult [ 0 ] . attachedPictures ? [ 0 ] . picture )
8181 }
8282
8383 func testFillFields( ) {
@@ -115,9 +115,9 @@ class FormTest: XCTestCase {
115115 albumArtist: " ::an album artist:: " ,
116116 album: " ::an album:: " ,
117117 title: " ::a title:: " ,
118- year : " ::an year:: " ,
118+ recordingDateTime : RecordingDateTime ( date : RecordingDate ( day : nil , month : nil , year: 2018 ) , time : nil ) ,
119119 genre: Genre ( genre: . ClassicRock, description: " Classic Rock " ) ,
120- attachedPictures: [ AttachedPicture ( art : Data ( ) , type: . FrontCover, format: . Jpeg) ] ,
120+ attachedPictures: [ AttachedPicture ( picture : Data ( ) , type: . FrontCover, format: . Jpeg) ] ,
121121 trackPosition: TrackPositionInSet ( position: 1 , totalTracks: 10 )
122122 ) )
123123 }
@@ -147,7 +147,7 @@ class FormTest: XCTestCase {
147147 XCTAssertNil ( title [ 0 ] )
148148 XCTAssertEqual ( title [ 1 ] , " ::a title:: " )
149149 XCTAssertNil ( year [ 0 ] )
150- XCTAssertEqual ( year [ 1 ] , " ::an year:: " )
150+ XCTAssertEqual ( year [ 1 ] , " 2018 " )
151151 XCTAssertNil ( genreIdentifier [ 0 ] )
152152 XCTAssertEqual ( genreIdentifier [ 1 ] , 1 )
153153 XCTAssertNil ( genreDescription [ 0 ] )
0 commit comments