import 'package:flutter_test/flutter_test.dart';
import 'package:marianum_mobile/api/marianumconnect/queries/timetable_get_element_week/timetable_element_type.dart';

void main() {
  group('TimetableElementType.pathSegment', () {
    test('maps each type to the backend URL segment', () {
      expect(TimetableElementType.student.pathSegment, 'student');
      expect(TimetableElementType.teacher.pathSegment, 'teacher');
      expect(TimetableElementType.room.pathSegment, 'room');
      // `schoolClass` exists only because `class` is a reserved word; the
      // backend segment must still be `class`.
      expect(TimetableElementType.schoolClass.pathSegment, 'class');
    });
  });

  group('TimetableElementType.label', () {
    test('provides a German singular label for each type', () {
      expect(TimetableElementType.student.label, 'Schüler');
      expect(TimetableElementType.teacher.label, 'Lehrer');
      expect(TimetableElementType.room.label, 'Raum');
      expect(TimetableElementType.schoolClass.label, 'Klasse');
    });
  });
}
