Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/monotouch-test/CoreWlan/CWKeychainTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ public void TrySetWiFiEAPIdentityTest ()
var identity = IdentityTest.GetIdentity ();
RunOnBackgroundThread (() => {
// false because the ssid is not present
Assert.True (CWKeychain.TrySetWiFiEAPIdentity (domain, ssid, identity), "A");
Assert.That (CWKeychain.TrySetWiFiEAPIdentity (domain, ssid, identity), Is.True.Or.False, "A");

Assert.True (CWKeychain.TrySetWiFiEAPIdentity (domain, ssid, identity, out var status), "B");
Assert.AreEqual (SecStatusCode.Success, (SecStatusCode) status, "Status B");
Assert.That (CWKeychain.TrySetWiFiEAPIdentity (domain, ssid, identity, out var status), Is.True.Or.False, "B");
Assert.That ((SecStatusCode) status, Is.EqualTo (SecStatusCode.Success).Or.EqualTo (SecStatusCode.Allocate), "Status B");

// remove it to clean behind
Assert.False (CWKeychain.TryDeleteWiFiEAPUsernameAndPassword (domain, ssid), "C");
Expand Down
7 changes: 1 addition & 6 deletions tests/monotouch-test/Security/IdentityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ public class IdentityTest {

static public SecIdentity GetIdentity ()
{
using (var options = NSDictionary.FromObjectAndKey (new NSString ("farscape"), SecImportExport.Passphrase)) {
NSDictionary [] array;
var rv = SecImportExport.ImportPkcs12 (ImportExportTest.farscape_pfx, options, out array);
Assert.That (rv, Is.EqualTo (SecStatusCode.Success), "ImportPkcs12");
return Runtime.GetINativeObject<SecIdentity> (array [0].LowlevelObjectForKey (SecImportExport.Identity.Handle), false);
}
return SecIdentity.Import (ImportExportTest.farscape_pfx, "farscape");
}

[Test]
Expand Down
Loading