diff --git a/Tests/Interface/MockRemoteInterface.swift b/Tests/Interface/MockRemoteInterface.swift index a41ccb55..9f750f9d 100644 --- a/Tests/Interface/MockRemoteInterface.swift +++ b/Tests/Interface/MockRemoteInterface.swift @@ -281,9 +281,8 @@ public class MockRemoteInterface: RemoteInterface { sourceItem.trashbinOriginalLocation = nil } - let matchingNameChildCount = destinationParent.children.count( - where: { $0.name == sourceItem.name } - ) + let matchingNameChildCount = + destinationParent.children.filter({ $0.name == sourceItem.name }).count if !overwrite && matchingNameChildCount > 0 { sourceItem.name += " (\(matchingNameChildCount))" diff --git a/Tests/Interface/MockRemoteItem.swift b/Tests/Interface/MockRemoteItem.swift index bfea404b..e708ac0b 100644 --- a/Tests/Interface/MockRemoteItem.swift +++ b/Tests/Interface/MockRemoteItem.swift @@ -148,7 +148,7 @@ public class MockRemoteItem: Equatable { ) metadata.date = modificationDate metadata.creationDate = creationDate - metadata.size = data?.count as? Int64 ?? 0 + metadata.size = size metadata.urlBase = account.serverUrl metadata.userId = account.id metadata.user = account.username