Files
superport/test/helpers/simple_mock_services.mocks.dart
JiWoong Sul d6f34c0a52 test: 테스트 자동화 구현 및 Mock 서비스 오류 수정
- 테스트 패키지 추가 (mockito, golden_toolkit, patrol 등)
- 테스트 가이드 문서 작성 (TEST_GUIDE.md)
- 테스트 진행 상황 문서 작성 (TEST_PROGRESS.md)
- 테스트 헬퍼 클래스 구현
  - test_helpers.dart: 기본 테스트 유틸리티
  - mock_data_helpers.dart: Mock 데이터 생성 헬퍼
  - mock_services.dart: Mock 서비스 설정 (오류 수정 완료)
  - simple_mock_services.dart: 간단한 Mock 서비스
- 단위 테스트 구현
  - CompanyListController 테스트
  - EquipmentListController 테스트
  - UserListController 테스트
- Widget 테스트 구현 (CompanyListScreen)

Mock 서비스 주요 수정사항:
- dartz import 추가
- Either 타입 제거 (실제 서비스와 일치하도록)
- 메서드 시그니처 수정 (실제 서비스 인터페이스와 일치)
- Mock 데이터 생성 메서드 추가

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 20:37:26 +09:00

1448 lines
36 KiB
Dart

// Mocks generated by Mockito 5.4.5 from annotations
// in superport/test/helpers/simple_mock_services.dart.
// Do not manually edit this file.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'dart:async' as _i9;
import 'package:dartz/dartz.dart' as _i2;
import 'package:mockito/mockito.dart' as _i1;
import 'package:superport/core/errors/failures.dart' as _i10;
import 'package:superport/data/models/auth/auth_user.dart' as _i14;
import 'package:superport/data/models/auth/login_request.dart' as _i12;
import 'package:superport/data/models/auth/login_response.dart' as _i11;
import 'package:superport/data/models/auth/token_response.dart' as _i13;
import 'package:superport/data/models/company/company_list_dto.dart' as _i16;
import 'package:superport/data/models/equipment/equipment_history_dto.dart'
as _i5;
import 'package:superport/data/models/equipment/equipment_io_response.dart'
as _i6;
import 'package:superport/data/models/equipment/equipment_list_dto.dart'
as _i21;
import 'package:superport/models/company_model.dart' as _i3;
import 'package:superport/models/equipment_unified_model.dart' as _i4;
import 'package:superport/models/license_model.dart' as _i18;
import 'package:superport/models/user_model.dart' as _i7;
import 'package:superport/models/warehouse_location_model.dart' as _i19;
import 'package:superport/services/auth_service.dart' as _i8;
import 'package:superport/services/company_service.dart' as _i15;
import 'package:superport/services/equipment_service.dart' as _i20;
import 'package:superport/services/mock_data_service.dart' as _i17;
import 'package:superport/services/user_service.dart' as _i22;
// ignore_for_file: type=lint
// ignore_for_file: avoid_redundant_argument_values
// ignore_for_file: avoid_setters_without_getters
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: implementation_imports
// ignore_for_file: invalid_use_of_visible_for_testing_member
// ignore_for_file: must_be_immutable
// ignore_for_file: prefer_const_constructors
// ignore_for_file: unnecessary_parenthesis
// ignore_for_file: camel_case_types
// ignore_for_file: subtype_of_sealed_class
class _FakeEither_0<L, R> extends _i1.SmartFake implements _i2.Either<L, R> {
_FakeEither_0(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeCompany_1 extends _i1.SmartFake implements _i3.Company {
_FakeCompany_1(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeBranch_2 extends _i1.SmartFake implements _i3.Branch {
_FakeBranch_2(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeEquipment_3 extends _i1.SmartFake implements _i4.Equipment {
_FakeEquipment_3(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeEquipmentHistoryDto_4 extends _i1.SmartFake
implements _i5.EquipmentHistoryDto {
_FakeEquipmentHistoryDto_4(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeEquipmentIoResponse_5 extends _i1.SmartFake
implements _i6.EquipmentIoResponse {
_FakeEquipmentIoResponse_5(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
class _FakeUser_6 extends _i1.SmartFake implements _i7.User {
_FakeUser_6(
Object parent,
Invocation parentInvocation,
) : super(
parent,
parentInvocation,
);
}
/// A class which mocks [AuthService].
///
/// See the documentation for Mockito's code generation for more information.
class MockAuthService extends _i1.Mock implements _i8.AuthService {
MockAuthService() {
_i1.throwOnMissingStub(this);
}
@override
_i9.Stream<bool> get authStateChanges => (super.noSuchMethod(
Invocation.getter(#authStateChanges),
returnValue: _i9.Stream<bool>.empty(),
) as _i9.Stream<bool>);
@override
_i9.Future<_i2.Either<_i10.Failure, _i11.LoginResponse>> login(
_i12.LoginRequest? request) =>
(super.noSuchMethod(
Invocation.method(
#login,
[request],
),
returnValue:
_i9.Future<_i2.Either<_i10.Failure, _i11.LoginResponse>>.value(
_FakeEither_0<_i10.Failure, _i11.LoginResponse>(
this,
Invocation.method(
#login,
[request],
),
)),
) as _i9.Future<_i2.Either<_i10.Failure, _i11.LoginResponse>>);
@override
_i9.Future<_i2.Either<_i10.Failure, void>> logout() => (super.noSuchMethod(
Invocation.method(
#logout,
[],
),
returnValue: _i9.Future<_i2.Either<_i10.Failure, void>>.value(
_FakeEither_0<_i10.Failure, void>(
this,
Invocation.method(
#logout,
[],
),
)),
) as _i9.Future<_i2.Either<_i10.Failure, void>>);
@override
_i9.Future<_i2.Either<_i10.Failure, _i13.TokenResponse>> refreshToken() =>
(super.noSuchMethod(
Invocation.method(
#refreshToken,
[],
),
returnValue:
_i9.Future<_i2.Either<_i10.Failure, _i13.TokenResponse>>.value(
_FakeEither_0<_i10.Failure, _i13.TokenResponse>(
this,
Invocation.method(
#refreshToken,
[],
),
)),
) as _i9.Future<_i2.Either<_i10.Failure, _i13.TokenResponse>>);
@override
_i9.Future<bool> isLoggedIn() => (super.noSuchMethod(
Invocation.method(
#isLoggedIn,
[],
),
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i9.Future<_i14.AuthUser?> getCurrentUser() => (super.noSuchMethod(
Invocation.method(
#getCurrentUser,
[],
),
returnValue: _i9.Future<_i14.AuthUser?>.value(),
) as _i9.Future<_i14.AuthUser?>);
@override
_i9.Future<String?> getAccessToken() => (super.noSuchMethod(
Invocation.method(
#getAccessToken,
[],
),
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i9.Future<String?> getRefreshToken() => (super.noSuchMethod(
Invocation.method(
#getRefreshToken,
[],
),
returnValue: _i9.Future<String?>.value(),
) as _i9.Future<String?>);
@override
_i9.Future<void> clearSession() => (super.noSuchMethod(
Invocation.method(
#clearSession,
[],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
}
/// A class which mocks [CompanyService].
///
/// See the documentation for Mockito's code generation for more information.
class MockCompanyService extends _i1.Mock implements _i15.CompanyService {
MockCompanyService() {
_i1.throwOnMissingStub(this);
}
@override
_i9.Future<List<_i3.Company>> getCompanies({
int? page = 1,
int? perPage = 20,
String? search,
bool? isActive,
}) =>
(super.noSuchMethod(
Invocation.method(
#getCompanies,
[],
{
#page: page,
#perPage: perPage,
#search: search,
#isActive: isActive,
},
),
returnValue: _i9.Future<List<_i3.Company>>.value(<_i3.Company>[]),
) as _i9.Future<List<_i3.Company>>);
@override
_i9.Future<_i3.Company> createCompany(_i3.Company? company) =>
(super.noSuchMethod(
Invocation.method(
#createCompany,
[company],
),
returnValue: _i9.Future<_i3.Company>.value(_FakeCompany_1(
this,
Invocation.method(
#createCompany,
[company],
),
)),
) as _i9.Future<_i3.Company>);
@override
_i9.Future<_i3.Company> getCompanyDetail(int? id) => (super.noSuchMethod(
Invocation.method(
#getCompanyDetail,
[id],
),
returnValue: _i9.Future<_i3.Company>.value(_FakeCompany_1(
this,
Invocation.method(
#getCompanyDetail,
[id],
),
)),
) as _i9.Future<_i3.Company>);
@override
_i9.Future<_i3.Company> getCompanyWithBranches(int? id) =>
(super.noSuchMethod(
Invocation.method(
#getCompanyWithBranches,
[id],
),
returnValue: _i9.Future<_i3.Company>.value(_FakeCompany_1(
this,
Invocation.method(
#getCompanyWithBranches,
[id],
),
)),
) as _i9.Future<_i3.Company>);
@override
_i9.Future<_i3.Company> updateCompany(
int? id,
_i3.Company? company,
) =>
(super.noSuchMethod(
Invocation.method(
#updateCompany,
[
id,
company,
],
),
returnValue: _i9.Future<_i3.Company>.value(_FakeCompany_1(
this,
Invocation.method(
#updateCompany,
[
id,
company,
],
),
)),
) as _i9.Future<_i3.Company>);
@override
_i9.Future<void> deleteCompany(int? id) => (super.noSuchMethod(
Invocation.method(
#deleteCompany,
[id],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i9.Future<List<Map<String, dynamic>>> getCompanyNames() =>
(super.noSuchMethod(
Invocation.method(
#getCompanyNames,
[],
),
returnValue: _i9.Future<List<Map<String, dynamic>>>.value(
<Map<String, dynamic>>[]),
) as _i9.Future<List<Map<String, dynamic>>>);
@override
_i9.Future<_i3.Branch> createBranch(
int? companyId,
_i3.Branch? branch,
) =>
(super.noSuchMethod(
Invocation.method(
#createBranch,
[
companyId,
branch,
],
),
returnValue: _i9.Future<_i3.Branch>.value(_FakeBranch_2(
this,
Invocation.method(
#createBranch,
[
companyId,
branch,
],
),
)),
) as _i9.Future<_i3.Branch>);
@override
_i9.Future<_i3.Branch> getBranchDetail(
int? companyId,
int? branchId,
) =>
(super.noSuchMethod(
Invocation.method(
#getBranchDetail,
[
companyId,
branchId,
],
),
returnValue: _i9.Future<_i3.Branch>.value(_FakeBranch_2(
this,
Invocation.method(
#getBranchDetail,
[
companyId,
branchId,
],
),
)),
) as _i9.Future<_i3.Branch>);
@override
_i9.Future<_i3.Branch> updateBranch(
int? companyId,
int? branchId,
_i3.Branch? branch,
) =>
(super.noSuchMethod(
Invocation.method(
#updateBranch,
[
companyId,
branchId,
branch,
],
),
returnValue: _i9.Future<_i3.Branch>.value(_FakeBranch_2(
this,
Invocation.method(
#updateBranch,
[
companyId,
branchId,
branch,
],
),
)),
) as _i9.Future<_i3.Branch>);
@override
_i9.Future<void> deleteBranch(
int? companyId,
int? branchId,
) =>
(super.noSuchMethod(
Invocation.method(
#deleteBranch,
[
companyId,
branchId,
],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i9.Future<List<_i3.Branch>> getCompanyBranches(int? companyId) =>
(super.noSuchMethod(
Invocation.method(
#getCompanyBranches,
[companyId],
),
returnValue: _i9.Future<List<_i3.Branch>>.value(<_i3.Branch>[]),
) as _i9.Future<List<_i3.Branch>>);
@override
_i9.Future<List<_i16.CompanyWithBranches>> getCompaniesWithBranches() =>
(super.noSuchMethod(
Invocation.method(
#getCompaniesWithBranches,
[],
),
returnValue: _i9.Future<List<_i16.CompanyWithBranches>>.value(
<_i16.CompanyWithBranches>[]),
) as _i9.Future<List<_i16.CompanyWithBranches>>);
@override
_i9.Future<bool> checkDuplicateCompany(String? name) => (super.noSuchMethod(
Invocation.method(
#checkDuplicateCompany,
[name],
),
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i9.Future<List<_i3.Company>> searchCompanies(String? query) =>
(super.noSuchMethod(
Invocation.method(
#searchCompanies,
[query],
),
returnValue: _i9.Future<List<_i3.Company>>.value(<_i3.Company>[]),
) as _i9.Future<List<_i3.Company>>);
@override
_i9.Future<void> updateCompanyStatus(
int? id,
bool? isActive,
) =>
(super.noSuchMethod(
Invocation.method(
#updateCompanyStatus,
[
id,
isActive,
],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
}
/// A class which mocks [MockDataService].
///
/// See the documentation for Mockito's code generation for more information.
class MockMockDataService extends _i1.Mock implements _i17.MockDataService {
MockMockDataService() {
_i1.throwOnMissingStub(this);
}
@override
void initialize() => super.noSuchMethod(
Invocation.method(
#initialize,
[],
),
returnValueForMissingStub: null,
);
@override
List<_i4.EquipmentIn> getAllEquipmentIns() => (super.noSuchMethod(
Invocation.method(
#getAllEquipmentIns,
[],
),
returnValue: <_i4.EquipmentIn>[],
) as List<_i4.EquipmentIn>);
@override
_i4.EquipmentIn? getEquipmentInById(int? id) =>
(super.noSuchMethod(Invocation.method(
#getEquipmentInById,
[id],
)) as _i4.EquipmentIn?);
@override
void addEquipmentIn(_i4.EquipmentIn? equipmentIn) => super.noSuchMethod(
Invocation.method(
#addEquipmentIn,
[equipmentIn],
),
returnValueForMissingStub: null,
);
@override
void updateEquipmentIn(_i4.EquipmentIn? equipmentIn) => super.noSuchMethod(
Invocation.method(
#updateEquipmentIn,
[equipmentIn],
),
returnValueForMissingStub: null,
);
@override
void deleteEquipmentIn(int? id) => super.noSuchMethod(
Invocation.method(
#deleteEquipmentIn,
[id],
),
returnValueForMissingStub: null,
);
@override
List<_i4.EquipmentOut> getAllEquipmentOuts() => (super.noSuchMethod(
Invocation.method(
#getAllEquipmentOuts,
[],
),
returnValue: <_i4.EquipmentOut>[],
) as List<_i4.EquipmentOut>);
@override
_i4.EquipmentOut? getEquipmentOutById(int? id) =>
(super.noSuchMethod(Invocation.method(
#getEquipmentOutById,
[id],
)) as _i4.EquipmentOut?);
@override
void changeEquipmentStatus(
int? equipmentInId,
_i4.EquipmentOut? equipmentOut,
) =>
super.noSuchMethod(
Invocation.method(
#changeEquipmentStatus,
[
equipmentInId,
equipmentOut,
],
),
returnValueForMissingStub: null,
);
@override
void addEquipmentOut(_i4.EquipmentOut? equipmentOut) => super.noSuchMethod(
Invocation.method(
#addEquipmentOut,
[equipmentOut],
),
returnValueForMissingStub: null,
);
@override
void updateEquipmentOut(_i4.EquipmentOut? equipmentOut) => super.noSuchMethod(
Invocation.method(
#updateEquipmentOut,
[equipmentOut],
),
returnValueForMissingStub: null,
);
@override
void deleteEquipmentOut(int? id) => super.noSuchMethod(
Invocation.method(
#deleteEquipmentOut,
[id],
),
returnValueForMissingStub: null,
);
@override
List<String> getAllManufacturers() => (super.noSuchMethod(
Invocation.method(
#getAllManufacturers,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<String> getAllEquipmentNames() => (super.noSuchMethod(
Invocation.method(
#getAllEquipmentNames,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<String> getAllCompanyNames() => (super.noSuchMethod(
Invocation.method(
#getAllCompanyNames,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<String> getAllBranchNames() => (super.noSuchMethod(
Invocation.method(
#getAllBranchNames,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<_i3.Company> getAllCompanies() => (super.noSuchMethod(
Invocation.method(
#getAllCompanies,
[],
),
returnValue: <_i3.Company>[],
) as List<_i3.Company>);
@override
_i3.Company? getCompanyById(int? id) => (super.noSuchMethod(Invocation.method(
#getCompanyById,
[id],
)) as _i3.Company?);
@override
_i3.Company? findCompanyByName(String? name) =>
(super.noSuchMethod(Invocation.method(
#findCompanyByName,
[name],
)) as _i3.Company?);
@override
void addCompany(_i3.Company? company) => super.noSuchMethod(
Invocation.method(
#addCompany,
[company],
),
returnValueForMissingStub: null,
);
@override
void updateCompany(_i3.Company? company) => super.noSuchMethod(
Invocation.method(
#updateCompany,
[company],
),
returnValueForMissingStub: null,
);
@override
void updateBranch(
int? companyId,
_i3.Branch? branch,
) =>
super.noSuchMethod(
Invocation.method(
#updateBranch,
[
companyId,
branch,
],
),
returnValueForMissingStub: null,
);
@override
void deleteCompany(int? id) => super.noSuchMethod(
Invocation.method(
#deleteCompany,
[id],
),
returnValueForMissingStub: null,
);
@override
List<_i7.User> getAllUsers() => (super.noSuchMethod(
Invocation.method(
#getAllUsers,
[],
),
returnValue: <_i7.User>[],
) as List<_i7.User>);
@override
_i7.User? getUserById(int? id) => (super.noSuchMethod(Invocation.method(
#getUserById,
[id],
)) as _i7.User?);
@override
void addUser(_i7.User? user) => super.noSuchMethod(
Invocation.method(
#addUser,
[user],
),
returnValueForMissingStub: null,
);
@override
void updateUser(_i7.User? user) => super.noSuchMethod(
Invocation.method(
#updateUser,
[user],
),
returnValueForMissingStub: null,
);
@override
void deleteUser(int? id) => super.noSuchMethod(
Invocation.method(
#deleteUser,
[id],
),
returnValueForMissingStub: null,
);
@override
List<_i18.License> getAllLicenses() => (super.noSuchMethod(
Invocation.method(
#getAllLicenses,
[],
),
returnValue: <_i18.License>[],
) as List<_i18.License>);
@override
_i18.License? getLicenseById(int? id) =>
(super.noSuchMethod(Invocation.method(
#getLicenseById,
[id],
)) as _i18.License?);
@override
void addLicense(_i18.License? license) => super.noSuchMethod(
Invocation.method(
#addLicense,
[license],
),
returnValueForMissingStub: null,
);
@override
void updateLicense(_i18.License? license) => super.noSuchMethod(
Invocation.method(
#updateLicense,
[license],
),
returnValueForMissingStub: null,
);
@override
void deleteLicense(int? id) => super.noSuchMethod(
Invocation.method(
#deleteLicense,
[id],
),
returnValueForMissingStub: null,
);
@override
List<_i4.UnifiedEquipment> getAllEquipments() => (super.noSuchMethod(
Invocation.method(
#getAllEquipments,
[],
),
returnValue: <_i4.UnifiedEquipment>[],
) as List<_i4.UnifiedEquipment>);
@override
_i4.UnifiedEquipment? getEquipmentById(
int? id,
String? status,
) =>
(super.noSuchMethod(Invocation.method(
#getEquipmentById,
[
id,
status,
],
)) as _i4.UnifiedEquipment?);
@override
void deleteEquipment(
int? id,
String? status,
) =>
super.noSuchMethod(
Invocation.method(
#deleteEquipment,
[
id,
status,
],
),
returnValueForMissingStub: null,
);
@override
List<_i19.WarehouseLocation> getAllWarehouseLocations() =>
(super.noSuchMethod(
Invocation.method(
#getAllWarehouseLocations,
[],
),
returnValue: <_i19.WarehouseLocation>[],
) as List<_i19.WarehouseLocation>);
@override
_i19.WarehouseLocation? getWarehouseLocationById(int? id) =>
(super.noSuchMethod(Invocation.method(
#getWarehouseLocationById,
[id],
)) as _i19.WarehouseLocation?);
@override
void addWarehouseLocation(_i19.WarehouseLocation? location) =>
super.noSuchMethod(
Invocation.method(
#addWarehouseLocation,
[location],
),
returnValueForMissingStub: null,
);
@override
void updateWarehouseLocation(_i19.WarehouseLocation? location) =>
super.noSuchMethod(
Invocation.method(
#updateWarehouseLocation,
[location],
),
returnValueForMissingStub: null,
);
@override
void deleteWarehouseLocation(int? id) => super.noSuchMethod(
Invocation.method(
#deleteWarehouseLocation,
[id],
),
returnValueForMissingStub: null,
);
@override
List<String> getAllCategories() => (super.noSuchMethod(
Invocation.method(
#getAllCategories,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<String> getAllSubCategories() => (super.noSuchMethod(
Invocation.method(
#getAllSubCategories,
[],
),
returnValue: <String>[],
) as List<String>);
@override
List<String> getAllSubSubCategories() => (super.noSuchMethod(
Invocation.method(
#getAllSubSubCategories,
[],
),
returnValue: <String>[],
) as List<String>);
}
/// A class which mocks [EquipmentService].
///
/// See the documentation for Mockito's code generation for more information.
class MockEquipmentService extends _i1.Mock implements _i20.EquipmentService {
MockEquipmentService() {
_i1.throwOnMissingStub(this);
}
@override
_i9.Future<List<_i21.EquipmentListDto>> getEquipmentsWithStatus({
int? page = 1,
int? perPage = 20,
String? status,
int? companyId,
int? warehouseLocationId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getEquipmentsWithStatus,
[],
{
#page: page,
#perPage: perPage,
#status: status,
#companyId: companyId,
#warehouseLocationId: warehouseLocationId,
},
),
returnValue: _i9.Future<List<_i21.EquipmentListDto>>.value(
<_i21.EquipmentListDto>[]),
) as _i9.Future<List<_i21.EquipmentListDto>>);
@override
_i9.Future<List<_i4.Equipment>> getEquipments({
int? page = 1,
int? perPage = 20,
String? status,
int? companyId,
int? warehouseLocationId,
}) =>
(super.noSuchMethod(
Invocation.method(
#getEquipments,
[],
{
#page: page,
#perPage: perPage,
#status: status,
#companyId: companyId,
#warehouseLocationId: warehouseLocationId,
},
),
returnValue: _i9.Future<List<_i4.Equipment>>.value(<_i4.Equipment>[]),
) as _i9.Future<List<_i4.Equipment>>);
@override
_i9.Future<_i4.Equipment> createEquipment(_i4.Equipment? equipment) =>
(super.noSuchMethod(
Invocation.method(
#createEquipment,
[equipment],
),
returnValue: _i9.Future<_i4.Equipment>.value(_FakeEquipment_3(
this,
Invocation.method(
#createEquipment,
[equipment],
),
)),
) as _i9.Future<_i4.Equipment>);
@override
_i9.Future<_i4.Equipment> getEquipmentDetail(int? id) => (super.noSuchMethod(
Invocation.method(
#getEquipmentDetail,
[id],
),
returnValue: _i9.Future<_i4.Equipment>.value(_FakeEquipment_3(
this,
Invocation.method(
#getEquipmentDetail,
[id],
),
)),
) as _i9.Future<_i4.Equipment>);
@override
_i9.Future<_i4.Equipment> getEquipment(int? id) => (super.noSuchMethod(
Invocation.method(
#getEquipment,
[id],
),
returnValue: _i9.Future<_i4.Equipment>.value(_FakeEquipment_3(
this,
Invocation.method(
#getEquipment,
[id],
),
)),
) as _i9.Future<_i4.Equipment>);
@override
_i9.Future<_i4.Equipment> updateEquipment(
int? id,
_i4.Equipment? equipment,
) =>
(super.noSuchMethod(
Invocation.method(
#updateEquipment,
[
id,
equipment,
],
),
returnValue: _i9.Future<_i4.Equipment>.value(_FakeEquipment_3(
this,
Invocation.method(
#updateEquipment,
[
id,
equipment,
],
),
)),
) as _i9.Future<_i4.Equipment>);
@override
_i9.Future<void> deleteEquipment(int? id) => (super.noSuchMethod(
Invocation.method(
#deleteEquipment,
[id],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i9.Future<_i4.Equipment> changeEquipmentStatus(
int? id,
String? status,
String? reason,
) =>
(super.noSuchMethod(
Invocation.method(
#changeEquipmentStatus,
[
id,
status,
reason,
],
),
returnValue: _i9.Future<_i4.Equipment>.value(_FakeEquipment_3(
this,
Invocation.method(
#changeEquipmentStatus,
[
id,
status,
reason,
],
),
)),
) as _i9.Future<_i4.Equipment>);
@override
_i9.Future<_i5.EquipmentHistoryDto> addEquipmentHistory(
int? equipmentId,
String? type,
int? quantity,
String? remarks,
) =>
(super.noSuchMethod(
Invocation.method(
#addEquipmentHistory,
[
equipmentId,
type,
quantity,
remarks,
],
),
returnValue: _i9.Future<_i5.EquipmentHistoryDto>.value(
_FakeEquipmentHistoryDto_4(
this,
Invocation.method(
#addEquipmentHistory,
[
equipmentId,
type,
quantity,
remarks,
],
),
)),
) as _i9.Future<_i5.EquipmentHistoryDto>);
@override
_i9.Future<List<_i5.EquipmentHistoryDto>> getEquipmentHistory(
int? equipmentId, {
int? page = 1,
int? perPage = 20,
}) =>
(super.noSuchMethod(
Invocation.method(
#getEquipmentHistory,
[equipmentId],
{
#page: page,
#perPage: perPage,
},
),
returnValue: _i9.Future<List<_i5.EquipmentHistoryDto>>.value(
<_i5.EquipmentHistoryDto>[]),
) as _i9.Future<List<_i5.EquipmentHistoryDto>>);
@override
_i9.Future<_i6.EquipmentIoResponse> equipmentIn({
required int? equipmentId,
required int? quantity,
int? warehouseLocationId,
String? notes,
}) =>
(super.noSuchMethod(
Invocation.method(
#equipmentIn,
[],
{
#equipmentId: equipmentId,
#quantity: quantity,
#warehouseLocationId: warehouseLocationId,
#notes: notes,
},
),
returnValue: _i9.Future<_i6.EquipmentIoResponse>.value(
_FakeEquipmentIoResponse_5(
this,
Invocation.method(
#equipmentIn,
[],
{
#equipmentId: equipmentId,
#quantity: quantity,
#warehouseLocationId: warehouseLocationId,
#notes: notes,
},
),
)),
) as _i9.Future<_i6.EquipmentIoResponse>);
@override
_i9.Future<_i6.EquipmentIoResponse> equipmentOut({
required int? equipmentId,
required int? quantity,
required int? companyId,
int? branchId,
String? notes,
}) =>
(super.noSuchMethod(
Invocation.method(
#equipmentOut,
[],
{
#equipmentId: equipmentId,
#quantity: quantity,
#companyId: companyId,
#branchId: branchId,
#notes: notes,
},
),
returnValue: _i9.Future<_i6.EquipmentIoResponse>.value(
_FakeEquipmentIoResponse_5(
this,
Invocation.method(
#equipmentOut,
[],
{
#equipmentId: equipmentId,
#quantity: quantity,
#companyId: companyId,
#branchId: branchId,
#notes: notes,
},
),
)),
) as _i9.Future<_i6.EquipmentIoResponse>);
}
/// A class which mocks [UserService].
///
/// See the documentation for Mockito's code generation for more information.
class MockUserService extends _i1.Mock implements _i22.UserService {
MockUserService() {
_i1.throwOnMissingStub(this);
}
@override
_i9.Future<List<_i7.User>> getUsers({
int? page = 1,
int? perPage = 20,
bool? isActive,
int? companyId,
String? role,
}) =>
(super.noSuchMethod(
Invocation.method(
#getUsers,
[],
{
#page: page,
#perPage: perPage,
#isActive: isActive,
#companyId: companyId,
#role: role,
},
),
returnValue: _i9.Future<List<_i7.User>>.value(<_i7.User>[]),
) as _i9.Future<List<_i7.User>>);
@override
_i9.Future<_i7.User> getUser(int? id) => (super.noSuchMethod(
Invocation.method(
#getUser,
[id],
),
returnValue: _i9.Future<_i7.User>.value(_FakeUser_6(
this,
Invocation.method(
#getUser,
[id],
),
)),
) as _i9.Future<_i7.User>);
@override
_i9.Future<_i7.User> createUser({
required String? username,
required String? email,
required String? password,
required String? name,
required String? role,
required int? companyId,
int? branchId,
String? phone,
String? position,
}) =>
(super.noSuchMethod(
Invocation.method(
#createUser,
[],
{
#username: username,
#email: email,
#password: password,
#name: name,
#role: role,
#companyId: companyId,
#branchId: branchId,
#phone: phone,
#position: position,
},
),
returnValue: _i9.Future<_i7.User>.value(_FakeUser_6(
this,
Invocation.method(
#createUser,
[],
{
#username: username,
#email: email,
#password: password,
#name: name,
#role: role,
#companyId: companyId,
#branchId: branchId,
#phone: phone,
#position: position,
},
),
)),
) as _i9.Future<_i7.User>);
@override
_i9.Future<_i7.User> updateUser(
int? id, {
String? name,
String? email,
String? password,
String? phone,
int? companyId,
int? branchId,
String? role,
String? position,
}) =>
(super.noSuchMethod(
Invocation.method(
#updateUser,
[id],
{
#name: name,
#email: email,
#password: password,
#phone: phone,
#companyId: companyId,
#branchId: branchId,
#role: role,
#position: position,
},
),
returnValue: _i9.Future<_i7.User>.value(_FakeUser_6(
this,
Invocation.method(
#updateUser,
[id],
{
#name: name,
#email: email,
#password: password,
#phone: phone,
#companyId: companyId,
#branchId: branchId,
#role: role,
#position: position,
},
),
)),
) as _i9.Future<_i7.User>);
@override
_i9.Future<void> deleteUser(int? id) => (super.noSuchMethod(
Invocation.method(
#deleteUser,
[id],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i9.Future<_i7.User> changeUserStatus(
int? id,
bool? isActive,
) =>
(super.noSuchMethod(
Invocation.method(
#changeUserStatus,
[
id,
isActive,
],
),
returnValue: _i9.Future<_i7.User>.value(_FakeUser_6(
this,
Invocation.method(
#changeUserStatus,
[
id,
isActive,
],
),
)),
) as _i9.Future<_i7.User>);
@override
_i9.Future<void> changePassword(
int? id,
String? currentPassword,
String? newPassword,
) =>
(super.noSuchMethod(
Invocation.method(
#changePassword,
[
id,
currentPassword,
newPassword,
],
),
returnValue: _i9.Future<void>.value(),
returnValueForMissingStub: _i9.Future<void>.value(),
) as _i9.Future<void>);
@override
_i9.Future<bool> checkDuplicateUsername(String? username) =>
(super.noSuchMethod(
Invocation.method(
#checkDuplicateUsername,
[username],
),
returnValue: _i9.Future<bool>.value(false),
) as _i9.Future<bool>);
@override
_i9.Future<List<_i7.User>> searchUsers({
required String? query,
int? companyId,
String? status,
String? permissionLevel,
int? page = 1,
int? perPage = 20,
}) =>
(super.noSuchMethod(
Invocation.method(
#searchUsers,
[],
{
#query: query,
#companyId: companyId,
#status: status,
#permissionLevel: permissionLevel,
#page: page,
#perPage: perPage,
},
),
returnValue: _i9.Future<List<_i7.User>>.value(<_i7.User>[]),
) as _i9.Future<List<_i7.User>>);
@override
String? getPhoneForApi(List<Map<String, String>>? phoneNumbers) =>
(super.noSuchMethod(Invocation.method(
#getPhoneForApi,
[phoneNumbers],
)) as String?);
}