Skip to content

Commit 1cc3217

Browse files
committed
Reorder tests
1 parent 68e32b6 commit 1cc3217

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

IdentityCore/tests/MSIDWorkPlaceJoinUtilTests.m

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ - (void)tearDown
7777
if (self.useIosStyleKeychain)
7878
{
7979
[self cleanWPJ:[self keychainGroup:YES]];
80-
//[self cleanWPJ:[self keychainGroup:NO]];
80+
[self cleanWPJ:[self keychainGroup:NO]];
8181
}
8282
[MSIDTestSwizzle reset];
8383
}
@@ -503,18 +503,6 @@ - (void)testGetWPJKeysWithNilTenantId_WithNoSecureEnclave_shouldReturnPrimaryReg
503503
}
504504

505505
#pragma mark - Session transport key tests
506-
- (void)testGetWPJKeysWithTenantId_whenEccRegistrationWithTransportKey_shouldReturnBothKeys
507-
{
508-
[self insertDummyEccRegistrationForTenantIdentifier:self.tenantId certIdentifier:kDummyTenant1CertIdentifier useSecureEnclave:YES];
509-
[self insertEccStkKeyForTenantIdentifier:self.tenantId];
510-
MSIDWPJKeyPairWithCert *result = [MSIDWorkPlaceJoinUtil getWPJKeysWithTenantId:self.tenantId context:nil];
511-
512-
XCTAssertNotNil(result);
513-
XCTAssertEqual(result.keyChainVersion, MSIDWPJKeychainAccessGroupV2);
514-
XCTAssertTrue(result.privateKeyRef != NULL);
515-
XCTAssertTrue(result.privateTransportKeyRef != NULL);
516-
}
517-
518506
- (void)testGetWPJKeysWithTenantId_whenEccRegistrationWithMissingTransportKey_shouldReturnOnlyDeviceKey
519507
{
520508
NSString *tid = self.tenantId;
@@ -529,6 +517,18 @@ - (void)testGetWPJKeysWithTenantId_whenEccRegistrationWithMissingTransportKey_sh
529517
XCTAssertTrue(result.privateTransportKeyRef == NULL, @"Expected privateTransportKeyRef to be nil when transport key is missing");
530518
}
531519

520+
- (void)testGetWPJKeysWithTenantId_whenEccRegistrationWithTransportKey_shouldReturnBothKeys
521+
{
522+
[self insertDummyEccRegistrationForTenantIdentifier:self.tenantId certIdentifier:kDummyTenant1CertIdentifier useSecureEnclave:YES];
523+
[self insertEccStkKeyForTenantIdentifier:self.tenantId];
524+
MSIDWPJKeyPairWithCert *result = [MSIDWorkPlaceJoinUtil getWPJKeysWithTenantId:self.tenantId context:nil];
525+
526+
XCTAssertNotNil(result);
527+
XCTAssertEqual(result.keyChainVersion, MSIDWPJKeychainAccessGroupV2);
528+
XCTAssertTrue(result.privateKeyRef != NULL);
529+
XCTAssertTrue(result.privateTransportKeyRef != NULL);
530+
}
531+
532532
- (void)testGetWPJKeysWithTenantId_whenPrimaryEccRegistrationWithTransportKey_shouldReturnCorrectKeys
533533
{
534534
[self addPrimaryEccDefaultRegistrationForTenantId:self.tenantId

0 commit comments

Comments
 (0)