secretive/SecretAgentKitTests/StubFileHandleReader.swift

15 lines
336 B
Swift
Raw Normal View History

2020-03-24 06:22:22 +00:00
import SecretAgentKit
import AppKit
struct StubFileHandleReader: FileHandleReader {
let availableData: Data
var fileDescriptor: Int32 {
NSWorkspace.shared.runningApplications.filter({ $0.localizedName == "Finder" }).first!.processIdentifier
}
var pidOfConnectedProcess: Int32 {
fileDescriptor
}
}