Skip to content

Commit

Permalink
Improve unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Sep 26, 2024
1 parent d4a99a1 commit a8cea2d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.mockStatic;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertThrows;
import static org.testng.Assert.*;
import static org.wso2.carbon.idp.mgt.util.IdPManagementConstants.RESET_PROVISIONING_ENTITIES_ON_CONFIG_UPDATE;

/**
Expand Down Expand Up @@ -1032,6 +1029,7 @@ public void testGetIdPByAuthenticatorPropertyValue(int tenantId, String idpName,
value, authenticator, tenantId, TENANT_DOMAIN);
if (isExist) {
assertEquals(idpResult.getIdentityProviderName(), idpName);
assertNotNull(idpResult.getDefaultAuthenticatorConfig().getDefinedByType());
} else {
assertNull(idpResult);
}
Expand Down Expand Up @@ -1084,6 +1082,7 @@ public void testGetIdPByAuthenticatorPropertyWithoutAuthenticatorData(int tenant

if (isExist) {
assertEquals(idpResult.getIdentityProviderName(), idpName);
assertNotNull(idpResult.getDefaultAuthenticatorConfig().getDefinedByType());
} else {
assertNull(idpResult);
}
Expand Down Expand Up @@ -1748,6 +1747,7 @@ private void addTestIdps() throws IdentityProviderManagementException {
property2.setConfidential(false);
federatedAuthenticatorConfig.setProperties(new Property[]{property1, property2});
idp1.setFederatedAuthenticatorConfigs(new FederatedAuthenticatorConfig[]{federatedAuthenticatorConfig});
idp1.setDefaultAuthenticatorConfig(federatedAuthenticatorConfig);

ProvisioningConnectorConfig provisioningConnectorConfig1 = new ProvisioningConnectorConfig();
provisioningConnectorConfig1.setName("ProvisiningConfig1");
Expand Down

0 comments on commit a8cea2d

Please sign in to comment.