secretive/SecretAgentKitTests/StubFileHandleReader.swift
2020-03-23 23:22:22 -07:00

15 lines
336 B
Swift

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
}
}