 //
-//  FirebaseNotificationsTokenRegistrationTests.swift
+//  FirebaseRemoteNotificationsTokenRegistrationTests.swift
 //  Eurofurence
 //
 //  Created by Thomas Sherwood on 15/07/2017.


}

class FirebaseNotificationsTokenRegistrationTests: XCTestCase {
    
    struct FirebaseNotificationsTokenRegistrationTestContext {
        var tokenRegistration: FirebaseNotificationsTokenRegistration
        var capturingFirebaseAdapter: CapturingFirebaseAdapter
        var capturingFCMDeviceRegister: CapturingFCMDeviceRegistration

        func registerDeviceToken(deviceToken: Data = Data()) {
            tokenRegistration.registerDevicePushToken(deviceToken)
        }
    }

    private func assembleApp(configuration: BuildConfiguration) -> FirebaseNotificationsTokenRegistrationTestContext {
        let buildConfigurationProviding = StubBuildConfigurationProviding(configuration: configuration)
        let capturingFirebaseAdapter = CapturingFirebaseAdapter()
        let capturingFCMDeviceRegister = CapturingFCMDeviceRegistration()
        let tokenRegistration = FirebaseNotificationsTokenRegistration(buildConfiguration: buildConfigurationProviding,
                                                                       firebaseAdapter: capturingFirebaseAdapter,
                                                                       fcmRegistration: capturingFCMDeviceRegister)

        return FirebaseNotificationsTokenRegistrationTestContext(tokenRegistration: tokenRegistration,
                                                                 capturingFirebaseAdapter: capturingFirebaseAdapter,
                                                                 capturingFCMDeviceRegister: capturingFCMDeviceRegister)
    }

    func testForDebugConfigurationTestNotificationsShouldBeSubscribed() {


}

protocol RemoteNotificationsTokenRegistration {

    func registerRemoteNotificationsDeviceToken(_ token: Data)

}

struct FirebaseRemoteNotificationsTokenRegistration: RemoteNotificationsTokenRegistration {

    private var buildConfiguration: BuildConfigurationProviding
    private var firebaseAdapter: FirebaseAdapter
