test: 통합 테스트 오류 및 경고 수정
- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정 - TestDataGenerator 제거하고 직접 객체 생성으로 변경 - 모델 필드명 및 타입 불일치 수정 - 불필요한 Either 패턴 사용 제거 - null safety 관련 이슈 해결 수정된 파일: - test/integration/screens/company_integration_test.dart - test/integration/screens/equipment_integration_test.dart - test/integration/screens/user_integration_test.dart - test/integration/screens/login_integration_test.dart
This commit is contained in:
1123
test/integration/automated/screens/license/license_screen_test.dart
Normal file
1123
test/integration/automated/screens/license/license_screen_test.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,67 @@
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:superport/di/injection_container.dart';
|
||||
import 'package:superport/data/datasources/remote/api_client.dart';
|
||||
import 'license_screen_test.dart';
|
||||
import '../../framework/infrastructure/test_context.dart';
|
||||
import '../../framework/infrastructure/report_collector.dart';
|
||||
import '../../framework/core/api_error_diagnostics.dart';
|
||||
import '../../framework/core/auto_fixer.dart' as auto_fixer;
|
||||
import '../../framework/core/test_data_generator.dart';
|
||||
|
||||
void main() {
|
||||
late LicenseScreenTest licenseScreenTest;
|
||||
late GetIt getIt;
|
||||
late ApiClient apiClient;
|
||||
late TestContext testContext;
|
||||
late ReportCollector reportCollector;
|
||||
late ApiErrorDiagnostics errorDiagnostics;
|
||||
late auto_fixer.ApiAutoFixer autoFixer;
|
||||
late TestDataGenerator dataGenerator;
|
||||
|
||||
setUpAll(() async {
|
||||
// 의존성 주입 초기화
|
||||
getIt = GetIt.instance;
|
||||
await setupDependencies();
|
||||
|
||||
// 테스트 컴포넌트 초기화
|
||||
apiClient = getIt<ApiClient>();
|
||||
testContext = TestContext();
|
||||
reportCollector = ReportCollector();
|
||||
errorDiagnostics = ApiErrorDiagnostics();
|
||||
autoFixer = auto_fixer.ApiAutoFixer(diagnostics: errorDiagnostics);
|
||||
dataGenerator = TestDataGenerator();
|
||||
|
||||
// 라이선스 화면 테스트 인스턴스 생성
|
||||
licenseScreenTest = LicenseScreenTest(
|
||||
apiClient: apiClient,
|
||||
getIt: getIt,
|
||||
testContext: testContext,
|
||||
errorDiagnostics: errorDiagnostics,
|
||||
autoFixer: autoFixer,
|
||||
dataGenerator: dataGenerator,
|
||||
reportCollector: reportCollector,
|
||||
);
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
// 정리 작업
|
||||
await getIt.reset();
|
||||
});
|
||||
|
||||
group('License Screen Tests', () {
|
||||
test('should run all license screen tests', () async {
|
||||
// 테스트 실행
|
||||
final result = await licenseScreenTest.runTests();
|
||||
|
||||
// 결과 검증
|
||||
expect(result, isNotNull);
|
||||
expect(result.failedTests, equals(0), reason: '라이선스 화면 테스트 실패');
|
||||
|
||||
// 테스트 완료 출력
|
||||
print('테스트 완료: ${result.totalTests}개 중 ${result.passedTests}개 성공');
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user