void CreatePolicy (NSString oid, NSString propertyOid = null) { string name = oid + "."; using (var policy = SecPolicy.CreatePolicy (oid, null)) { Assert.That (CFGetRetainCount (policy.Handle), Is.EqualTo ((nint) 1), name + "RetainCount"); Assert.That (policy.GetProperties ().Values [0].ToString (), Is.EqualTo ((string) (propertyOid ?? oid)), name + "SecPolicyOid"); } }
public void CreateUnknownPolicy() { TestRuntime.AssertXcodeVersion(5, 0); using (var oid = new NSString("1.2.3.4")) { Assert.Throws <ArgumentException> (delegate { SecPolicy.CreatePolicy(oid, null); }); } }
public void CreateUnknownPolicy () { TestRuntime.AssertXcodeVersion (5, 0); TestRuntime.AssertSystemVersion (PlatformName.MacOSX, 10, 9, throwIfOtherPlatform: false); using (var oid = new NSString ("1.2.3.4")) { Assert.Throws<ArgumentException> (delegate { SecPolicy.CreatePolicy (oid, null); }); } }
public void CreateUnknownPolicy() { if (!TestRuntime.CheckSystemAndSDKVersion(7, 0)) { Assert.Inconclusive("requires iOS7"); } using (var oid = new NSString("1.2.3.4")) { Assert.Throws <ArgumentException> (delegate { SecPolicy.CreatePolicy(oid, null); }); } }