MockDirectusApiManager class

Inheritance
Mixed-in types
  • MockMixin

Constructors

MockDirectusApiManager()

Properties

accessToken String?
no setteroverride
baseUrl String
no setteroverride
calledFunctions List<String>
finalinherited
hashCode int
The hash code for this object.
no setterinherited
lastReceivedObject ↔ dynamic
getter/setter pairinherited
methodCallList List<MethodCall>
A list of all the method calls that were made to the mock Note: this list will be filled only if you use the method addCall and not if you use the method addCalledFunction (which only supports functions names)
finalinherited
nextReturnedObject ↔ dynamic
getter/setter pairinherited
receivedObjects Map<String, dynamic>
finalinherited
refreshToken String?
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldRefreshToken bool
no setteroverride
webSocketBaseUrl String
no setteroverride

Methods

addCall({required String named, Map<String, dynamic> arguments = const {}}) → void
Adds a method call to the list of method calls and adds the arguments to the list of received objects
inherited
addCalledFunction({required String named}) → void
inherited
addNextReturnFutureObject(dynamic object) → void
Receives a regular object and save it for the next function that will need to return something
inherited
addReceivedObject(dynamic object, {required String name}) → void
inherited
callsForMethod({required String named}) List<MethodCall>
Returns all the MethodCall of a specific method each call will contain the method name and argument
inherited
clearCacheWithKey(String cacheEntryKey) Future<void>
override
confirmPasswordReset({required String token, required String password}) Future<bool>
override
createMultipleItems<Type extends DirectusData>({String? fields, required Iterable<Type> objectList}) Future<DirectusItemCreationResult<Type>>
override
createNewItem<Type extends DirectusData>({required Type objectToCreate, String? fields}) Future<DirectusItemCreationResult<Type>>
override
currentDirectusUser({String fields = "*", bool canUseCacheForResponse = false, bool canSaveResponseToCache = true, bool canUseOldCachedResponseAsFallback = true, Duration maxCacheAge = const Duration(days: 1)}) Future<DirectusUser?>
override
deleteFile({required String fileId}) Future<bool>
override
deleteItem<Type extends DirectusData>({required String objectId, bool mustBeAuthenticated = true}) Future<bool>
override
deleteMultipleItems<Type extends DirectusData>({required Iterable objectIdsToDelete, bool mustBeAuthenticated = true}) Future<bool>
override
discardCurrentUserCache() → void
override
findListOfItems<Type extends DirectusData>({Filter? filter, List<SortProperty>? sortBy, String? fields, int? limit, int? offset, String? requestIdentifier, bool canUseCacheForResponse = false, bool canSaveResponseToCache = true, bool canUseOldCachedResponseAsFallback = true, List<String> extraTags = const [], Duration maxCacheAge = const Duration(days: 1)}) Future<Iterable<Type>>
override
getSpecificItem<Type extends DirectusData>({required String id, String? fields, String? requestIdentifier, bool canUseCacheForResponse = false, bool canSaveResponseToCache = true, bool canUseOldCachedResponseAsFallback = true, List<String> extraTags = const [], Duration maxCacheAge = const Duration(days: 1)}) Future<Type?>
override
hasLoggedInUser() Future<bool>
override
lastCall() → MethodCall?
inherited
lastCallForMethod({required String named}) → MethodCall?
inherited
loginDirectusUser(String username, String password, {String? oneTimePassword}) Future<DirectusLoginResult>
override
logoutDirectusUser() Future<bool>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
popNextReturnedObject() → dynamic
inherited
registerDirectusUser({required String email, required String password, String? firstname, String? lastname}) Future<bool>
override
requestPasswordReset({required String email, String? resetUrl}) Future<bool>
override
resetAllTestValues() → void
inherited
sendRequestToEndpoint<T>({required BaseRequest prepareRequest(), required T jsonConverter(Response p1)}) Future<T>
override
toString() String
A string representation of this object.
inherited
tryAndRefreshToken() Future<bool>
override
updateExistingFile({required List<int> fileBytes, required String fileId, required String filename, String? contentType}) Future<DirectusFile>
override
updateItem<Type extends DirectusData>({required Type objectToUpdate, String? fields, bool force = false}) Future<Type>
override
uploadFile({required List<int> fileBytes, required String filename, String? title, String? contentType, String? folder, String storage = "local", Map<String, dynamic>? additionalFields}) Future<DirectusFile>
override
uploadFileFromUrl({required String remoteUrl, String? title, String? folder}) Future<DirectusFile>
override
wasCalled({required String functionName}) bool
inherited
wasCalledWithArguments({required String functionName, Map<String, dynamic> arguments = const {}}) bool
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited