refactoring: tests User fix bug testFindSystemTbResources
This commit is contained in:
parent
53564f792c
commit
c89a497348
@ -341,7 +341,7 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest {
|
||||
}
|
||||
|
||||
private void testPushMsgToRuleEngineTime(ArgumentMatcher<EntityId> matcherOriginatorId, TenantId tenantId, HasName entity, int cntTime) {
|
||||
tenantId = tenantId.isNullUid() ? ((HasTenantId) entity).getTenantId() : tenantId;
|
||||
tenantId = tenantId.isNullUid() && ((HasTenantId) entity).getTenantId() != null ? ((HasTenantId) entity).getTenantId() : tenantId;
|
||||
Mockito.verify(tbClusterService, times(cntTime)).pushMsgToRuleEngine(Mockito.eq(tenantId),
|
||||
Mockito.argThat(matcherOriginatorId), Mockito.any(TbMsg.class), Mockito.isNull());
|
||||
}
|
||||
|
||||
@ -1188,7 +1188,6 @@ public abstract class BaseDeviceControllerTest extends AbstractControllerTest {
|
||||
Assert.assertEquals(0, pageData.getData().size());
|
||||
}
|
||||
|
||||
|
||||
protected void testNotificationUpdateGatewayOneTime(Device device, Device oldDevice) {
|
||||
Mockito.verify(gatewayNotificationsService, times(1)).onDeviceUpdated(Mockito.eq(device), Mockito.eq(oldDevice));
|
||||
}
|
||||
|
||||
@ -76,9 +76,10 @@ public abstract class BaseUserControllerTest extends AbstractControllerTest {
|
||||
User foundUser = doGet("/api/user/" + savedUser.getId().getId().toString(), User.class);
|
||||
Assert.assertEquals(foundUser, savedUser);
|
||||
|
||||
testNotifyEntityAllOneTime(savedUser, savedUser.getId(), savedUser.getId(),
|
||||
testNotifyManyEntityManyTimeMsgToEdgeServiceEntityEqAny(foundUser, foundUser,
|
||||
SYSTEM_TENANT, customerNUULId, null, SYS_ADMIN_EMAIL,
|
||||
ActionType.ADDED);
|
||||
ActionType.ADDED, ActionType.ADDED, 1, 1, 1);
|
||||
Mockito.reset(tbClusterService, auditLogService);
|
||||
|
||||
logout();
|
||||
doGet("/api/noauth/activate?activateToken={activateToken}", TestMailService.currentActivateToken)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user