fixed tests
This commit is contained in:
parent
0fe6865b18
commit
21172a6195
@ -53,6 +53,7 @@ import org.thingsboard.server.common.data.id.NotificationId;
|
|||||||
import org.thingsboard.server.common.data.id.TenantId;
|
import org.thingsboard.server.common.data.id.TenantId;
|
||||||
import org.thingsboard.server.common.data.id.TenantProfileId;
|
import org.thingsboard.server.common.data.id.TenantProfileId;
|
||||||
import org.thingsboard.server.common.data.mobile.app.MobileApp;
|
import org.thingsboard.server.common.data.mobile.app.MobileApp;
|
||||||
|
import org.thingsboard.server.common.data.mobile.bundle.MobileAppBundle;
|
||||||
import org.thingsboard.server.common.data.notification.NotificationRequest;
|
import org.thingsboard.server.common.data.notification.NotificationRequest;
|
||||||
import org.thingsboard.server.common.data.notification.rule.NotificationRule;
|
import org.thingsboard.server.common.data.notification.rule.NotificationRule;
|
||||||
import org.thingsboard.server.common.data.notification.targets.NotificationTarget;
|
import org.thingsboard.server.common.data.notification.targets.NotificationTarget;
|
||||||
@ -72,6 +73,7 @@ import org.thingsboard.server.dao.device.DeviceService;
|
|||||||
import org.thingsboard.server.dao.domain.DomainService;
|
import org.thingsboard.server.dao.domain.DomainService;
|
||||||
import org.thingsboard.server.dao.edge.EdgeService;
|
import org.thingsboard.server.dao.edge.EdgeService;
|
||||||
import org.thingsboard.server.dao.entityview.EntityViewService;
|
import org.thingsboard.server.dao.entityview.EntityViewService;
|
||||||
|
import org.thingsboard.server.dao.mobile.MobileAppBundleService;
|
||||||
import org.thingsboard.server.dao.mobile.MobileAppService;
|
import org.thingsboard.server.dao.mobile.MobileAppService;
|
||||||
import org.thingsboard.server.dao.notification.NotificationRequestService;
|
import org.thingsboard.server.dao.notification.NotificationRequestService;
|
||||||
import org.thingsboard.server.dao.notification.NotificationRuleService;
|
import org.thingsboard.server.dao.notification.NotificationRuleService;
|
||||||
@ -151,6 +153,8 @@ public class TenantIdLoaderTest {
|
|||||||
private DomainService domainService;
|
private DomainService domainService;
|
||||||
@Mock
|
@Mock
|
||||||
private MobileAppService mobileAppService;
|
private MobileAppService mobileAppService;
|
||||||
|
@Mock
|
||||||
|
private MobileAppBundleService mobileAppBundleService;
|
||||||
|
|
||||||
private TenantId tenantId;
|
private TenantId tenantId;
|
||||||
private TenantProfileId tenantProfileId;
|
private TenantProfileId tenantProfileId;
|
||||||
@ -392,6 +396,12 @@ public class TenantIdLoaderTest {
|
|||||||
when(ctx.getMobileAppService()).thenReturn(mobileAppService);
|
when(ctx.getMobileAppService()).thenReturn(mobileAppService);
|
||||||
doReturn(mobileApp).when(mobileAppService).findMobileAppById(eq(tenantId), any());
|
doReturn(mobileApp).when(mobileAppService).findMobileAppById(eq(tenantId), any());
|
||||||
break;
|
break;
|
||||||
|
case MOBILE_APP_BUNDLE:
|
||||||
|
MobileAppBundle mobileAppBundle = new MobileAppBundle();
|
||||||
|
mobileAppBundle.setTenantId(tenantId);
|
||||||
|
when(ctx.getMobileAppBundleService()).thenReturn(mobileAppBundleService);
|
||||||
|
doReturn(mobileAppBundle).when(mobileAppBundleService).findMobileAppBundleById(eq(tenantId), any());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException("Unexpected originator EntityType " + entityType);
|
throw new RuntimeException("Unexpected originator EntityType " + entityType);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user