Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
30
iphone/Maps/Tests/Core/iCloudTests/MetadataItemStubs.swift
Normal file
30
iphone/Maps/Tests/Core/iCloudTests/MetadataItemStubs.swift
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@testable import CoMaps__Debug_
|
||||
|
||||
extension LocalMetadataItem {
|
||||
static func stub(fileName: String,
|
||||
lastModificationDate: TimeInterval) -> LocalMetadataItem {
|
||||
let item = LocalMetadataItem(fileName: fileName,
|
||||
fileUrl: URL(string: "url")!,
|
||||
lastModificationDate: lastModificationDate)
|
||||
return item
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
extension CloudMetadataItem {
|
||||
static func stub(fileName: String,
|
||||
lastModificationDate: TimeInterval,
|
||||
isDownloaded: Bool = true,
|
||||
percentDownloaded: NSNumber = 100.0,
|
||||
hasUnresolvedConflicts: Bool = false) -> CloudMetadataItem {
|
||||
let item = CloudMetadataItem(fileName: fileName,
|
||||
fileUrl: URL(string: "url")!,
|
||||
isDownloaded: isDownloaded,
|
||||
percentDownloaded: percentDownloaded,
|
||||
lastModificationDate: lastModificationDate,
|
||||
downloadingError: nil,
|
||||
uploadingError: nil,
|
||||
hasUnresolvedConflicts: hasUnresolvedConflicts)
|
||||
return item
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue