import XCTest
@testable import ByteLystPlatformSDK

final class BLPlatformConfigTests: XCTestCase {

    func testInitWithDefaults() {
        let config = BLPlatformConfig(
            productId: "testapp",
            baseURL: "http://localhost:4003",
            bundleId: "com.bytelyst.testapp"
        )
        XCTAssertEqual(config.productId, "testapp")
        XCTAssertEqual(config.baseURL, "http://localhost:4003")
        XCTAssertEqual(config.platform, "ios")
        XCTAssertEqual(config.channel, "native")
        XCTAssertEqual(config.bundleId, "com.bytelyst.testapp")
        XCTAssertNil(config.appGroupId)
    }

    func testInitWithCustomValues() {
        let config = BLPlatformConfig(
            productId: "peakpulse",
            baseURL: "https://api.peakpulse.app",
            platform: "watchos",
            channel: "companion",
            bundleId: "com.saravana.peakpulse",
            appGroupId: "group.com.saravana.peakpulse"
        )
        XCTAssertEqual(config.productId, "peakpulse")
        XCTAssertEqual(config.platform, "watchos")
        XCTAssertEqual(config.channel, "companion")
        XCTAssertEqual(config.appGroupId, "group.com.saravana.peakpulse")
    }
}
