public void Init() { args = new Dictionary <string, NSScriptCommandArgumentDescription> { { "firstArg", new NSScriptCommandArgumentDescription { Name = "firstArg", AppleEventCode = "fArg", Type = "integer", IsOptional = true } }, { "secondArg", new NSScriptCommandArgumentDescription { Name = "secondArg", AppleEventCode = "sArg", Type = "NSNumber" } }, { "thirdArg", new NSScriptCommandArgumentDescription { Name = "thirdArg", AppleEventCode = "tArg", Type = "integer" } } }; suiteName = "Chromium Suite"; commandName = "Exec Python"; cmdClass = "NSScriptCommand"; eventCode = "ExPy"; eventClass = "CrSu"; returnType = "NSString"; resultAppleEvent = "text"; dict = new NSScriptCommandDescriptionDictionary { CommandClass = cmdClass, AppleEventCode = eventCode, AppleEventClassCode = eventClass, Type = returnType, ResultAppleEventCode = resultAppleEvent }; foreach (var arg in args.Values) { dict.Add(arg); } scriptDescription = NSScriptCommandDescription.Create(suiteName, commandName, dict); }
public void TestCreateWithDictNullOrEmptyCommandName(string code) { var description = new NSScriptCommandDescriptionDictionary(); NSScriptCommandDescription.Create(suiteName, code, description); }
public void TestCreateWithDictWrongArgDescription() { var description = new NSScriptCommandDescriptionDictionary(); NSScriptCommandDescription.Create(suiteName, commandName, description); }
public void TestCreateEventCodeNullOrEmpty(string code) { dict.AppleEventCode = code; NSScriptCommandDescription.Create(suiteName, commandName, dict); }
public void TestCreateResultAppleEventWrongLength(string code) { dict.ResultAppleEventCode = code; NSScriptCommandDescription.Create(suiteName, commandName, dict); }
public void TestCreateCommandNameNullOrEmpty(string code) { NSScriptCommandDescription.Create(suiteName, code, dict); }
public void TestCreateCmdClassNullOrEmpty(string code) { dict.CommandClass = code; NSScriptCommandDescription.Create(suiteName, commandName, dict); }
public void TestCreateWithDictNullDict() { NSScriptCommandDescriptionDictionary dict = null; Assert.Throws <ArgumentNullException> (() => NSScriptCommandDescription.Create(suiteName, commandName, dict)); }
public void TestCreateWithDictNullDict() { NSScriptCommandDescriptionDictionary dict = null; NSScriptCommandDescription.Create(suiteName, commandName, dict); }
public void TestCreateWithDictNullOrEmptyCommandName(string code) { var description = new NSScriptCommandDescriptionDictionary(); Assert.Throws <ArgumentException> (() => NSScriptCommandDescription.Create(suiteName, code, description)); }
public void TestCreateWithDictWrongArgDescription() { var description = new NSScriptCommandDescriptionDictionary(); Assert.Throws <ArgumentException> (() => NSScriptCommandDescription.Create(suiteName, commandName, description)); }
public void TestCreateResultAppleEventWrongLength(string code) { dict.ResultAppleEventCode = code; Assert.Throws <ArgumentException> (() => NSScriptCommandDescription.Create(suiteName, commandName, dict)); }
public void TestCreateEventCodeNullOrEmpty(string code) { dict.AppleEventCode = code; Assert.Throws <ArgumentException> (() => NSScriptCommandDescription.Create(suiteName, commandName, dict)); }
public void TestCreateSuiteNameNullOrEmpty(string code) { Assert.Throws <ArgumentException> (() => NSScriptCommandDescription.Create(code, commandName, dict)); }