 
     // TODO: disabled test, SessionAssetsJSONAdapter is not working
     func _testAssetsAdapter() {
-        let json = getJson(from: "videos")
-
-        guard let sessionsArray = try? json["sessions"].rawData() else {
-            XCTFail("Couldn't find an array of sessions in videos.json")
-            fatalError()
-        }
-
-        guard let assets = try? JSONDecoder().decode([SessionAsset].self, from: sessionsArray) else {
-            XCTFail("Couldn't find an array of sessions in videos.json")
-            fatalError()
-        }
+        struct TestFixture: Decodable {
+            let sessions: [SessionAsset]
+        }
+
+        let assets = loadFixture(from: "videos", type: TestFixture.self).sessions
 
         let flattenedAssets = assets.compactMap({ $0 })
         XCTAssertEqual(flattenedAssets.count, 2947)

//

import XCTest
import SwiftyJSON
@testable import ConfCore

class AdapterTests: XCTestCase {

    private let dateTimeFormatter: DateFormatter = {
        let formatter = DateFormatter()
        formatter.dateFormat = confCoreDateFormat
        formatter.locale = Locale(identifier: "en-US")
        formatter.timeZone = TimeZone.current
        return formatter
    }()

    private func getJson(from filename: String) -> JSON {
        guard let fileURL = Bundle(for: AdapterTests.self).url(forResource: filename, withExtension: "json") else {
            XCTFail("Unable to find URL for fixture named \(filename)")
            fatalError()
        }

        guard let data = try? Data(contentsOf: fileURL), let json = try? JSON(data: data) else {
            XCTFail("Unable to load fixture named \(filename)")
            fatalError()
        }

        return json
    }

    private func getJSONData(from filename: String) -> Data {
        guard let fileURL = Bundle(for: AdapterTests.self).url(forResource: filename, withExtension: "json") else {
            XCTFail("Unable to find URL for fixture named \(filename)")
            fatalError()
        }

        guard let data = try? Data(contentsOf: fileURL) else {
            XCTFail("Unable to load fixture named \(filename)")
            fatalError()
        }

        return data
    }

    func testEventsAdapter() {
        let json = getJson(from: "contents")

        guard let eventsArray = try? json["events"].rawData() else {
            XCTFail("Sessions.json fixture doesn't have an \"events\" array")
            fatalError()
        }

        let decoder = JSONDecoder()
        decoder.dateDecodingStrategy = .formatted(.confCoreFormatter)

        guard let events = try? decoder.decode([Event].self, from: eventsArray) else {
            XCTFail("Sessions.json fixture doesn't have an \"events\" array")
            return
        }

        XCTAssertEqual(events.count, 5)


    }

    func testTranscriptsAdapter() {
        let transcript = loadFixture(from: "transcript", type: Transcript.self)

        XCTAssertEqual(transcript.identifier, "wwdc2014-101")
        XCTAssertEqual(transcript.fullText.count, 92023)
