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:
@@ -6,8 +6,8 @@ part 'login_request.g.dart';
|
||||
@freezed
|
||||
class LoginRequest with _$LoginRequest {
|
||||
const factory LoginRequest({
|
||||
String? username,
|
||||
String? email,
|
||||
@JsonKey(includeIfNull: false) String? username,
|
||||
@JsonKey(includeIfNull: false) String? email,
|
||||
required String password,
|
||||
}) = _LoginRequest;
|
||||
|
||||
|
||||
@@ -20,7 +20,9 @@ LoginRequest _$LoginRequestFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LoginRequest {
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get username => throw _privateConstructorUsedError;
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get email => throw _privateConstructorUsedError;
|
||||
String get password => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -40,7 +42,10 @@ abstract class $LoginRequestCopyWith<$Res> {
|
||||
LoginRequest value, $Res Function(LoginRequest) then) =
|
||||
_$LoginRequestCopyWithImpl<$Res, LoginRequest>;
|
||||
@useResult
|
||||
$Res call({String? username, String? email, String password});
|
||||
$Res call(
|
||||
{@JsonKey(includeIfNull: false) String? username,
|
||||
@JsonKey(includeIfNull: false) String? email,
|
||||
String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -87,7 +92,10 @@ abstract class _$$LoginRequestImplCopyWith<$Res>
|
||||
__$$LoginRequestImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String? username, String? email, String password});
|
||||
$Res call(
|
||||
{@JsonKey(includeIfNull: false) String? username,
|
||||
@JsonKey(includeIfNull: false) String? email,
|
||||
String password});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -127,14 +135,19 @@ class __$$LoginRequestImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LoginRequestImpl implements _LoginRequest {
|
||||
const _$LoginRequestImpl({this.username, this.email, required this.password});
|
||||
const _$LoginRequestImpl(
|
||||
{@JsonKey(includeIfNull: false) this.username,
|
||||
@JsonKey(includeIfNull: false) this.email,
|
||||
required this.password});
|
||||
|
||||
factory _$LoginRequestImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LoginRequestImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? username;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
final String? email;
|
||||
@override
|
||||
final String password;
|
||||
@@ -178,16 +191,18 @@ class _$LoginRequestImpl implements _LoginRequest {
|
||||
|
||||
abstract class _LoginRequest implements LoginRequest {
|
||||
const factory _LoginRequest(
|
||||
{final String? username,
|
||||
final String? email,
|
||||
{@JsonKey(includeIfNull: false) final String? username,
|
||||
@JsonKey(includeIfNull: false) final String? email,
|
||||
required final String password}) = _$LoginRequestImpl;
|
||||
|
||||
factory _LoginRequest.fromJson(Map<String, dynamic> json) =
|
||||
_$LoginRequestImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get username;
|
||||
@override
|
||||
@JsonKey(includeIfNull: false)
|
||||
String? get email;
|
||||
@override
|
||||
String get password;
|
||||
|
||||
@@ -15,7 +15,7 @@ _$LoginRequestImpl _$$LoginRequestImplFromJson(Map<String, dynamic> json) =>
|
||||
|
||||
Map<String, dynamic> _$$LoginRequestImplToJson(_$LoginRequestImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'username': instance.username,
|
||||
'email': instance.email,
|
||||
if (instance.username case final value?) 'username': value,
|
||||
if (instance.email case final value?) 'email': value,
|
||||
'password': instance.password,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user