|
|
@ -86,11 +86,15 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
Mockito.eq(edgeTypeByActionType(actionType))); |
|
|
Mockito.eq(edgeTypeByActionType(actionType))); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(relation.getTo()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(relation.getTo()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = Objects::isNull; |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = Objects::isNull; |
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
testPushMsgToRuleEngineNever(relation.getTo()); |
|
|
testPushMsgToRuleEngineNever(relation.getTo()); |
|
|
matcherOriginatorId = argument -> argument.equals(relation.getFrom()); |
|
|
matcherOriginatorId = argument -> argument.equals(relation.getFrom()); |
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
testPushMsgToRuleEngineNever(relation.getFrom()); |
|
|
testPushMsgToRuleEngineNever(relation.getFrom()); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
@ -104,7 +108,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
Mockito.eq(edgeTypeByActionType(actionType))); |
|
|
Mockito.eq(edgeTypeByActionType(actionType))); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(relation.getFrom().getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(relation.getFrom().getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = Objects::isNull; |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = Objects::isNull; |
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, |
|
|
userName, actionType, cntTime * 2, 1); |
|
|
userName, actionType, cntTime * 2, 1); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
@ -152,7 +160,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
testNotificationMsgToEdgeServiceNeverWithActionType(entityId, actionType); |
|
|
testNotificationMsgToEdgeServiceNeverWithActionType(entityId, actionType); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
extractMatcherAdditionalInfo(additionalInfo)); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
@ -166,7 +178,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
testSendNotificationMsgToEdgeServiceTimeEntityEqAny(tenantId, actionTypeEdge, cntTimeEdge); |
|
|
testSendNotificationMsgToEdgeServiceTimeEntityEqAny(tenantId, actionTypeEdge, cntTimeEdge); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfo(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
extractMatcherAdditionalInfoClass(additionalInfo)); |
|
|
extractMatcherAdditionalInfoClass(additionalInfo)); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeRuleEngine); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeRuleEngine); |
|
|
} |
|
|
} |
|
|
@ -178,7 +194,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
testSendNotificationMsgToEdgeServiceTimeEntityEqAny(tenantId, actionTypeEdge, cntTimeEdge); |
|
|
testSendNotificationMsgToEdgeServiceTimeEntityEqAny(tenantId, actionTypeEdge, cntTimeEdge); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
cntAdditionalInfo); |
|
|
cntAdditionalInfo); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeEdge); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeEdge); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
@ -192,7 +212,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
testNotificationMsgToEdgeServiceNeverWithActionType(entityId, actionType); |
|
|
testNotificationMsgToEdgeServiceNeverWithActionType(entityId, actionType); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
cntAdditionalInfo); |
|
|
cntAdditionalInfo); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTime); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
Mockito.reset(tbClusterService, auditLogService); |
|
|
@ -233,7 +257,11 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
testNotificationMsgToEdgeServiceTime(entityId, tenantId, actionTypeEdge, cntTimeEdge); |
|
|
testNotificationMsgToEdgeServiceTime(entityId, tenantId, actionTypeEdge, cntTimeEdge); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityClassEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.getClass().equals(originatorId.getClass()); |
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, customerId, userId, userName, actionType, cntTime, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfoAny(matcherEntityClassEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, actionType, cntTime, |
|
|
cntAdditionalInfo); |
|
|
cntAdditionalInfo); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeRuleEngine); |
|
|
testPushMsgToRuleEngineTime(matcherOriginatorId, tenantId, cntTimeRuleEngine); |
|
|
testBroadcastEntityStateChangeEventTime(entityId, tenantId, cntTime); |
|
|
testBroadcastEntityStateChangeEventTime(entityId, tenantId, cntTime); |
|
|
@ -364,9 +392,13 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
private void testLogEntityAction(HasName entity, EntityId originatorId, TenantId tenantId, |
|
|
private void testLogEntityAction(HasName entity, EntityId originatorId, TenantId tenantId, |
|
|
CustomerId customerId, UserId userId, String userName, |
|
|
CustomerId customerId, UserId userId, String userName, |
|
|
ActionType actionType, int cntTime, Object... additionalInfo) { |
|
|
ActionType actionType, int cntTime, Object... additionalInfo) { |
|
|
ArgumentMatcher<HasName> matcherEntityEquals = entity == null ? Objects::isNull : argument -> argument.equals(entity); |
|
|
ArgumentMatcher<HasName> matcherEntityEquals = entity == null ? Objects::isNull : argument -> argument.toString().equals(entity.toString()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(originatorId); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(originatorId); |
|
|
testLogEntityActionAdditionalInfo(matcherEntityEquals, matcherOriginatorId, tenantId, customerId, userId, userName, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfo(matcherEntityEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, |
|
|
actionType, cntTime, extractMatcherAdditionalInfo(additionalInfo)); |
|
|
actionType, cntTime, extractMatcherAdditionalInfo(additionalInfo)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -375,19 +407,24 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
ActionType actionType, int cntTime, Object... additionalInfo) { |
|
|
ActionType actionType, int cntTime, Object... additionalInfo) { |
|
|
ArgumentMatcher<HasName> matcherEntityEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<HasName> matcherEntityEquals = argument -> argument.getClass().equals(entity.getClass()); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(originatorId); |
|
|
ArgumentMatcher<EntityId> matcherOriginatorId = argument -> argument.equals(originatorId); |
|
|
testLogEntityActionAdditionalInfo(matcherEntityEquals, matcherOriginatorId, tenantId, customerId, userId, userName, |
|
|
ArgumentMatcher<CustomerId> matcherCustomerId = customerId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(CustomerId.class) : argument -> argument.equals(customerId); |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId = userId == null ? |
|
|
|
|
|
argument -> argument.getClass().equals(UserId.class) : argument -> argument.equals(userId); |
|
|
|
|
|
testLogEntityActionAdditionalInfo(matcherEntityEquals, matcherOriginatorId, tenantId, matcherCustomerId, matcherUserId, userName, |
|
|
actionType, cntTime, extractMatcherAdditionalInfo(additionalInfo)); |
|
|
actionType, cntTime, extractMatcherAdditionalInfo(additionalInfo)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void testLogEntityActionAdditionalInfo(ArgumentMatcher<HasName> matcherEntity, ArgumentMatcher<EntityId> matcherOriginatorId, |
|
|
private void testLogEntityActionAdditionalInfo(ArgumentMatcher<HasName> matcherEntity, ArgumentMatcher<EntityId> matcherOriginatorId, |
|
|
TenantId tenantId, CustomerId customerId, UserId userId, String userName, |
|
|
TenantId tenantId, ArgumentMatcher<CustomerId> matcherCustomerId, |
|
|
ActionType actionType, int cntTime, List<ArgumentMatcher<Object>> matcherAdditionalInfos) { |
|
|
ArgumentMatcher<UserId> matcherUserId, String userName, ActionType actionType, |
|
|
|
|
|
int cntTime, List<ArgumentMatcher<Object>> matcherAdditionalInfos) { |
|
|
switch (matcherAdditionalInfos.size()) { |
|
|
switch (matcherAdditionalInfos.size()) { |
|
|
case 1: |
|
|
case 1: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -398,8 +435,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
case 2: |
|
|
case 2: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -411,8 +448,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
case 3: |
|
|
case 3: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -425,8 +462,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
default: |
|
|
default: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -436,14 +473,15 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void testLogEntityActionAdditionalInfoAny(ArgumentMatcher<HasName> matcherEntity, ArgumentMatcher<EntityId> matcherOriginatorId, |
|
|
private void testLogEntityActionAdditionalInfoAny(ArgumentMatcher<HasName> matcherEntity, ArgumentMatcher<EntityId> matcherOriginatorId, |
|
|
TenantId tenantId, CustomerId customerId, UserId userId, String userName, |
|
|
TenantId tenantId, ArgumentMatcher<CustomerId> matcherCustomerId, |
|
|
|
|
|
ArgumentMatcher<UserId> matcherUserId, String userName, |
|
|
ActionType actionType, int cntTime, int cntAdditionalInfo) { |
|
|
ActionType actionType, int cntTime, int cntAdditionalInfo) { |
|
|
switch (cntAdditionalInfo) { |
|
|
switch (cntAdditionalInfo) { |
|
|
case 1: |
|
|
case 1: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -454,8 +492,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
case 2: |
|
|
case 2: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -467,8 +505,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
case 3: |
|
|
case 3: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
@ -481,8 +519,8 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest { |
|
|
default: |
|
|
default: |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
Mockito.verify(auditLogService, times(cntTime)) |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
.logEntityAction(Mockito.eq(tenantId), |
|
|
Mockito.eq(customerId), |
|
|
Mockito.argThat(matcherCustomerId), |
|
|
Mockito.eq(userId), |
|
|
Mockito.argThat(matcherUserId), |
|
|
Mockito.eq(userName), |
|
|
Mockito.eq(userName), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherOriginatorId), |
|
|
Mockito.argThat(matcherEntity), |
|
|
Mockito.argThat(matcherEntity), |
|
|
|