-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Loading branch information
Showing
7 changed files
with
50 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ema/src/test/java/com/ibm/fhir/schema/app/processor/action/GrantPrivelegesActionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* (C) Copyright IBM Corp. 2020 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.ibm.fhir.schema.app.processor.action; | ||
|
||
import static org.testng.Assert.assertNotNull; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import com.ibm.fhir.database.utils.api.IDatabaseAdapter; | ||
import com.ibm.fhir.database.utils.api.ITransactionProvider; | ||
import com.ibm.fhir.schema.app.processor.action.bean.ActionBean; | ||
import com.ibm.fhir.schema.app.processor.action.exceptions.SchemaActionException; | ||
|
||
/** | ||
* GrantPrivilegesAction Test | ||
*/ | ||
public class GrantPrivelegesActionTest { | ||
@Test | ||
public void testGrantPrivilegesAction() throws SchemaActionException { | ||
ActionBean actionBean = new ActionBean(); | ||
actionBean.setTenantId(1); | ||
actionBean.setAdminSchemaName("ADMIN_SCHEMA"); | ||
actionBean.setSchemaName("FHIR_SCHEMA"); | ||
IDatabaseAdapter adapter = DatabaseSupport.generateMapAdapter(null); //DatabaseSupport.generateUndefinedName() | ||
ITransactionProvider transactionProvider = DatabaseSupport.generateTransactionProvider(); | ||
GrantPrivilegesAction action = new GrantPrivilegesAction(); | ||
action.run(actionBean, null, adapter, transactionProvider); | ||
assertNotNull(actionBean.getAdminSchemaName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters