 //
-//  KeyedDecodingContainerTests.swift
+//  KeyedDecodingContainerExtensionsTests.swift
 //  SwifterSwift
 //
 //  Created by Francesco Deliro on 23/10/2019.

    func testDecodeBoolAsIntOrStringDataAsStringSuccessful() {
        let isPlayingAndIsFullScreenAsString = #"{"isPlaying": "true", "isFullScreen": "false"}"#
        let data = mockJsonData(from: isPlayingAndIsFullScreenAsString)
        let video = try! JSONDecoder().decode(Video.self, from: data)
        XCTAssertTrue(video.isPlaying)
        XCTAssertEqual(video.isFullScreen, false)
    }

    func testDecodeBoolAsIntOrStringDataAsBoolSuccessful() {
        let isPlayingAndIsFullScreenAsBool = #"{"isPlaying": true, "isFullScreen": false}"#
        let data = mockJsonData(from: isPlayingAndIsFullScreenAsBool)
        let video = try! JSONDecoder().decode(Video.self, from: data) // swiftlint:disable:this force_try
        XCTAssertTrue(video.isPlaying)
        XCTAssertEqual(video.isFullScreen, false)
    }
