import 'package:flutter_test/flutter_test.dart';

import 'package:chanora_flutter/services/audio_lifecycle_service.dart';
import 'package:chanora_flutter/src/rust/api.dart' as rust;

void main() {
  test('parseBridgeAudioRoute maps platform route names', () {
    expect(parseBridgeAudioRoute('Earpiece'), rust.BridgeAudioRoute.earpiece);
    expect(parseBridgeAudioRoute('Speaker'), rust.BridgeAudioRoute.speaker);
    expect(
      parseBridgeAudioRoute('WiredHeadset'),
      rust.BridgeAudioRoute.wiredHeadset,
    );
    expect(
      parseBridgeAudioRoute('BluetoothHfp'),
      rust.BridgeAudioRoute.bluetoothHfp,
    );
    expect(
      parseBridgeAudioRoute('BluetoothA2dp'),
      rust.BridgeAudioRoute.bluetoothA2Dp,
    );
    expect(parseBridgeAudioRoute('Unknown'), rust.BridgeAudioRoute.unknown);
    expect(parseBridgeAudioRoute('Other'), rust.BridgeAudioRoute.unknown);
  });
}
