Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Legal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Security and Compliance
Legal
Commits
d2e2ae22
Commit
d2e2ae22
authored
4 years ago
by
Aalekh Jain
Browse files
Options
Downloads
Patches
Plain Diff
Updated `LegalTagPublisherImplTest.java`
parent
50437e62
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!61
Improve code coverage
Pipeline
#13894
failed
4 years ago
Stage: review
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/jobs/LegalTagPublisherImplTest.java
+7
-3
7 additions, 3 deletions
...roup/osdu/legal/azure/jobs/LegalTagPublisherImplTest.java
with
7 additions
and
3 deletions
provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/jobs/LegalTagPublisherImplTest.java
+
7
−
3
View file @
d2e2ae22
...
@@ -27,6 +27,7 @@ import org.mockito.ArgumentCaptor;
...
@@ -27,6 +27,7 @@ import org.mockito.ArgumentCaptor;
import
org.mockito.InjectMocks
;
import
org.mockito.InjectMocks
;
import
org.mockito.Mock
;
import
org.mockito.Mock
;
import
org.mockito.junit.MockitoJUnitRunner
;
import
org.mockito.junit.MockitoJUnitRunner
;
import
org.opengroup.osdu.azure.servicebus.ITopicClientFactory
;
import
org.opengroup.osdu.core.common.logging.JaxRsDpsLog
;
import
org.opengroup.osdu.core.common.logging.JaxRsDpsLog
;
import
org.opengroup.osdu.core.common.model.http.DpsHeaders
;
import
org.opengroup.osdu.core.common.model.http.DpsHeaders
;
import
org.opengroup.osdu.core.common.model.legal.StatusChangedTags
;
import
org.opengroup.osdu.core.common.model.legal.StatusChangedTags
;
...
@@ -42,10 +43,14 @@ public class LegalTagPublisherImplTest {
...
@@ -42,10 +43,14 @@ public class LegalTagPublisherImplTest {
private
static
final
String
DATA_PARTITION_WITH_FALLBACK_ACCOUNT_ID
=
"data-partition-account-id"
;
private
static
final
String
DATA_PARTITION_WITH_FALLBACK_ACCOUNT_ID
=
"data-partition-account-id"
;
private
static
final
String
CORRELATION_ID
=
"correlation-id"
;
private
static
final
String
CORRELATION_ID
=
"correlation-id"
;
private
static
final
String
USER_EMAIL
=
"user@email.com"
;
private
static
final
String
USER_EMAIL
=
"user@email.com"
;
private
static
final
String
PARTITION_ID
=
"partition-id"
;
@Mock
@Mock
private
JaxRsDpsLog
logger
;
private
JaxRsDpsLog
logger
;
@Mock
private
ITopicClientFactory
topicClientFactory
;
@Mock
@Mock
private
TopicClient
topicClient
;
private
TopicClient
topicClient
;
...
@@ -57,12 +62,11 @@ public class LegalTagPublisherImplTest {
...
@@ -57,12 +62,11 @@ public class LegalTagPublisherImplTest {
@Before
@Before
public
void
init
()
throws
ServiceBusException
,
InterruptedException
{
public
void
init
()
throws
ServiceBusException
,
InterruptedException
{
lenient
().
doNothing
().
when
(
topicClient
).
send
(
any
());
lenient
().
doNothing
().
when
(
logger
).
error
(
anyString
(),
(
Exception
)
any
());
lenient
().
doNothing
().
when
(
logger
).
info
(
anyString
());
doReturn
(
DATA_PARTITION_WITH_FALLBACK_ACCOUNT_ID
).
when
(
headers
).
getPartitionIdWithFallbackToAccountId
();
doReturn
(
DATA_PARTITION_WITH_FALLBACK_ACCOUNT_ID
).
when
(
headers
).
getPartitionIdWithFallbackToAccountId
();
doReturn
(
CORRELATION_ID
).
when
(
headers
).
getCorrelationId
();
doReturn
(
CORRELATION_ID
).
when
(
headers
).
getCorrelationId
();
doReturn
(
USER_EMAIL
).
when
(
headers
).
getUserEmail
();
doReturn
(
USER_EMAIL
).
when
(
headers
).
getUserEmail
();
doReturn
(
PARTITION_ID
).
when
(
headers
).
getPartitionId
();
doReturn
(
topicClient
).
when
(
topicClientFactory
).
getClient
(
eq
(
PARTITION_ID
),
any
());
}
}
@Test
@Test
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment