1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import Foundation
- extension NSMutableDictionary {
-
- class func fileInfoWith(_ fileName:String, refFilePath:String?, resultPath:String, comparePath:String, objc:AutoTest) -> NSMutableDictionary {
- let dic = NSMutableDictionary.init()
-
- dic.setValue(fileName, forKey: "fileName");
- dic.setValue(resultPath, forKey: "resultPath");
- dic.setValue(comparePath, forKey: "comparePath");
- if nil != refFilePath {
- dic.setValue(refFilePath, forKey: "refFilePath")
- }
- dic.setValue(objc, forKey: "objc");
-
- return dic
- }
-
- func fileName() -> String {
- return self.value(forKey: "fileName") as! String
- }
-
- func resultPath() -> String {
- return self.value(forKey: "resultPath") as! String
- }
-
- func comparePath() -> String {
- return self.value(forKey: "comparePath") as! String
- }
-
- func refFilePath() -> String? {
- if nil == self.value(forKey: "refFilePath") {
- return nil
- }
-
- return self.value(forKey: "refFilePath") as? String
- }
-
- func objc() -> AutoTest {
- return self.value(forKey: "objc") as! AutoTest
- }
- }
|