renamed base controller/service tests
This commit is contained in:
parent
0e84fc1c6a
commit
93c219c83e
@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseAdminControllerTest extends AbstractControllerTest {
|
||||
public class AdminControllerTest extends AbstractControllerTest {
|
||||
final JwtSettings defaultJwtSettings = new JwtSettings(9000, 604800, "thingsboard.io", "thingsboardDefaultSigningKey");
|
||||
|
||||
@Test
|
||||
@ -49,9 +49,9 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@Slf4j
|
||||
@ContextConfiguration(classes = {BaseAlarmCommentControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {AlarmCommentControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseAlarmCommentControllerTest extends AbstractControllerTest {
|
||||
public class AlarmCommentControllerTest extends AbstractControllerTest {
|
||||
|
||||
protected Device customerDevice;
|
||||
protected Alarm alarm;
|
||||
@ -49,9 +49,9 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@Slf4j
|
||||
@ContextConfiguration(classes = {BaseAlarmControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {AlarmControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseAlarmControllerTest extends AbstractControllerTest {
|
||||
public class AlarmControllerTest extends AbstractControllerTest {
|
||||
|
||||
public static final String TEST_ALARM_TYPE = "Test";
|
||||
|
||||
@ -57,9 +57,9 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
|
||||
@ContextConfiguration(classes = {BaseAssetControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {AssetControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseAssetControllerTest extends AbstractControllerTest {
|
||||
public class AssetControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<Asset> idComparator = new IdComparator<>();
|
||||
|
||||
@ -52,9 +52,9 @@ import java.util.stream.Collectors;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@ContextConfiguration(classes = {BaseAssetProfileControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {AssetProfileControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseAssetProfileControllerTest extends AbstractControllerTest {
|
||||
public class AssetProfileControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<AssetProfile> idComparator = new IdComparator<>();
|
||||
private IdComparator<AssetProfileInfo> assetProfileInfoIdComparator = new IdComparator<>();
|
||||
@ -52,7 +52,7 @@ import static org.mockito.Mockito.verify;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAuditLogControllerTest extends AbstractControllerTest {
|
||||
public class AuditLogControllerTest extends AbstractControllerTest {
|
||||
|
||||
private Tenant savedTenant;
|
||||
private User tenantAdmin;
|
||||
@ -26,7 +26,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAuthControllerTest extends AbstractControllerTest {
|
||||
public class AuthControllerTest extends AbstractControllerTest {
|
||||
|
||||
@Test
|
||||
public void testGetUser() throws Exception {
|
||||
@ -35,7 +35,7 @@ import java.util.List;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseComponentDescriptorControllerTest extends AbstractControllerTest {
|
||||
public class ComponentDescriptorControllerTest extends AbstractControllerTest {
|
||||
|
||||
private static final int AMOUNT_OF_DEFAULT_FILTER_NODES = 4;
|
||||
private Tenant savedTenant;
|
||||
@ -54,9 +54,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@ContextConfiguration(classes = {BaseCustomerControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {CustomerControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseCustomerControllerTest extends AbstractControllerTest {
|
||||
public class CustomerControllerTest extends AbstractControllerTest {
|
||||
static final TypeReference<PageData<Customer>> PAGE_DATA_CUSTOMER_TYPE_REFERENCE = new TypeReference<>() {
|
||||
};
|
||||
|
||||
@ -52,9 +52,9 @@ import java.util.List;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@ContextConfiguration(classes = {BaseDashboardControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {DashboardControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseDashboardControllerTest extends AbstractControllerTest {
|
||||
public class DashboardControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<DashboardInfo> idComparator = new IdComparator<>();
|
||||
|
||||
@ -85,9 +85,9 @@ import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.SOFTWARE;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
|
||||
@ContextConfiguration(classes = {BaseDeviceControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {DeviceControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceControllerTest extends AbstractControllerTest {
|
||||
public class DeviceControllerTest extends AbstractControllerTest {
|
||||
static final TypeReference<PageData<Device>> PAGE_DATA_DEVICE_TYPE_REF = new TypeReference<>() {
|
||||
};
|
||||
|
||||
@ -63,9 +63,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.SOFTWARE;
|
||||
|
||||
@ContextConfiguration(classes = {BaseDeviceProfileControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {DeviceProfileControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceProfileControllerTest extends AbstractControllerTest {
|
||||
public class DeviceProfileControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<DeviceProfile> idComparator = new IdComparator<>();
|
||||
private IdComparator<DeviceProfileInfo> deviceProfileInfoIdComparator = new IdComparator<>();
|
||||
@ -78,9 +78,9 @@ import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
@TestPropertySource(properties = {
|
||||
"edges.enabled=true",
|
||||
})
|
||||
@ContextConfiguration(classes = {BaseEdgeControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {EdgeControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseEdgeControllerTest extends AbstractControllerTest {
|
||||
public class EdgeControllerTest extends AbstractControllerTest {
|
||||
|
||||
public static final String EDGE_HOST = "localhost";
|
||||
public static final int EDGE_PORT = 7070;
|
||||
@ -61,7 +61,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
})
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseEdgeEventControllerTest extends AbstractControllerTest {
|
||||
public class EdgeEventControllerTest extends AbstractControllerTest {
|
||||
|
||||
private Tenant savedTenant;
|
||||
private User tenantAdmin;
|
||||
@ -64,7 +64,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseEntityQueryControllerTest extends AbstractControllerTest {
|
||||
public class EntityQueryControllerTest extends AbstractControllerTest {
|
||||
|
||||
private Tenant savedTenant;
|
||||
private User tenantAdmin;
|
||||
@ -52,7 +52,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseEntityRelationControllerTest extends AbstractControllerTest {
|
||||
public class EntityRelationControllerTest extends AbstractControllerTest {
|
||||
|
||||
public static final String BASE_DEVICE_NAME = "Test dummy device";
|
||||
|
||||
@ -90,9 +90,9 @@ import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
"js.evaluator=mock",
|
||||
})
|
||||
@Slf4j
|
||||
@ContextConfiguration(classes = {BaseEntityViewControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {EntityViewControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseEntityViewControllerTest extends AbstractControllerTest {
|
||||
public class EntityViewControllerTest extends AbstractControllerTest {
|
||||
static final TypeReference<PageData<EntityView>> PAGE_DATA_ENTITY_VIEW_TYPE_REF = new TypeReference<>() {
|
||||
};
|
||||
static final TypeReference<PageData<EntityViewInfo>> PAGE_DATA_ENTITY_VIEW_INFO_TYPE_REF = new TypeReference<>() {
|
||||
@ -75,7 +75,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseHomePageApiTest extends AbstractControllerTest {
|
||||
public class HomePageApiTest extends AbstractControllerTest {
|
||||
|
||||
@Autowired
|
||||
private TbApiUsageStateClient apiUsageStateClient;
|
||||
@ -50,7 +50,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseOtaPackageControllerTest extends AbstractControllerTest {
|
||||
public class OtaPackageControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<OtaPackageInfo> idComparator = new IdComparator<>();
|
||||
|
||||
@ -38,7 +38,7 @@ import java.util.List;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseRpcControllerTest extends AbstractControllerTest {
|
||||
public class RpcControllerTest extends AbstractControllerTest {
|
||||
|
||||
private Tenant savedTenant;
|
||||
private User tenantAdmin;
|
||||
@ -54,9 +54,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@ContextConfiguration(classes = {BaseRuleChainControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {RuleChainControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseRuleChainControllerTest extends AbstractControllerTest {
|
||||
public class RuleChainControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<RuleChain> idComparator = new IdComparator<>();
|
||||
|
||||
@ -42,7 +42,7 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTbResourceControllerTest extends AbstractControllerTest {
|
||||
public class TbResourceControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<TbResourceInfo> idComparator = new IdComparator<>();
|
||||
|
||||
@ -25,7 +25,7 @@ import org.thingsboard.server.dao.service.DaoSqlTest;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTelemetryControllerTest extends AbstractControllerTest {
|
||||
public class TelemetryControllerTest extends AbstractControllerTest {
|
||||
|
||||
@Test
|
||||
public void testConstraintValidator() throws Exception {
|
||||
@ -71,7 +71,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
})
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseTenantControllerTest extends AbstractControllerTest {
|
||||
public class TenantControllerTest extends AbstractControllerTest {
|
||||
|
||||
static final TypeReference<PageData<Tenant>> PAGE_DATA_TENANT_TYPE_REF = new TypeReference<>() {
|
||||
};
|
||||
@ -49,7 +49,7 @@ import static org.mockito.Mockito.times;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTenantProfileControllerTest extends AbstractControllerTest {
|
||||
public class TenantProfileControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<TenantProfile> idComparator = new IdComparator<>();
|
||||
private IdComparator<EntityInfo> tenantProfileInfoIdComparator = new IdComparator<>();
|
||||
@ -67,9 +67,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.SYSTEM_TENANT;
|
||||
|
||||
@ContextConfiguration(classes = {BaseUserControllerTest.Config.class})
|
||||
@ContextConfiguration(classes = {UserControllerTest.Config.class})
|
||||
@DaoSqlTest
|
||||
public class BaseUserControllerTest extends AbstractControllerTest {
|
||||
public class UserControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<User> idComparator = new IdComparator<>();
|
||||
private IdComparator<UserEmailInfo> userDataIdComparator = new IdComparator<>();
|
||||
@ -75,7 +75,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseWebsocketApiTest extends AbstractControllerTest {
|
||||
public class WebsocketApiTest extends AbstractControllerTest {
|
||||
@Autowired
|
||||
private TelemetrySubscriptionService tsService;
|
||||
|
||||
@ -38,7 +38,7 @@ import static org.hamcrest.Matchers.containsString;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseWidgetTypeControllerTest extends AbstractControllerTest {
|
||||
public class WidgetTypeControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<WidgetType> idComparator = new IdComparator<>();
|
||||
|
||||
@ -42,7 +42,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.SYSTEM_TENANT;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseWidgetsBundleControllerTest extends AbstractControllerTest {
|
||||
public class WidgetsBundleControllerTest extends AbstractControllerTest {
|
||||
|
||||
private IdComparator<WidgetsBundle> idComparator = new IdComparator<>();
|
||||
|
||||
@ -41,7 +41,7 @@ import java.util.UUID;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAlarmEdgeTest extends AbstractEdgeTest {
|
||||
public class AlarmEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testSendAlarmToCloud() throws Exception {
|
||||
@ -34,7 +34,7 @@ import java.util.UUID;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAssetEdgeTest extends AbstractEdgeTest {
|
||||
public class AssetEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testAssets() throws Exception {
|
||||
@ -30,7 +30,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAssetProfileEdgeTest extends AbstractEdgeTest {
|
||||
public class AssetProfileEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testAssetProfiles() throws Exception {
|
||||
@ -30,7 +30,7 @@ import java.util.Optional;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseCustomerEdgeTest extends AbstractEdgeTest {
|
||||
public class CustomerEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testCreateUpdateDeleteCustomer() throws Exception {
|
||||
@ -33,7 +33,7 @@ import java.util.Set;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDashboardEdgeTest extends AbstractEdgeTest {
|
||||
public class DashboardEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testDashboards() throws Exception {
|
||||
@ -81,7 +81,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
"transport.mqtt.enabled=true"
|
||||
})
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceEdgeTest extends AbstractEdgeTest {
|
||||
public class DeviceEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testDevices() throws Exception {
|
||||
@ -56,7 +56,7 @@ import java.util.Optional;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceProfileEdgeTest extends AbstractEdgeTest {
|
||||
public class DeviceProfileEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testDeviceProfiles() throws Exception {
|
||||
@ -30,7 +30,7 @@ import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseEdgeTest extends AbstractEdgeTest {
|
||||
public class EdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testEdge_assignToCustomer_unassignFromCustomer() throws Exception {
|
||||
@ -36,7 +36,7 @@ import java.util.UUID;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseEntityViewEdgeTest extends AbstractEdgeTest {
|
||||
public class EntityViewEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testEntityViews() throws Exception {
|
||||
@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseOtaPackageEdgeTest extends AbstractEdgeTest {
|
||||
public class OtaPackageEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testOtaPackages_usesUrl() throws Exception {
|
||||
@ -31,7 +31,7 @@ import org.thingsboard.server.gen.edge.v1.UpdateMsgType;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseQueueEdgeTest extends AbstractEdgeTest {
|
||||
public class QueueEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testQueues() throws Exception {
|
||||
@ -35,7 +35,7 @@ import java.util.UUID;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseRelationEdgeTest extends AbstractEdgeTest {
|
||||
public class RelationEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
|
||||
@Test
|
||||
@ -39,7 +39,7 @@ import java.util.UUID;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseRuleChainEdgeTest extends AbstractEdgeTest {
|
||||
public class RuleChainEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testRuleChains() throws Exception {
|
||||
@ -41,7 +41,7 @@ import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTelemetryEdgeTest extends AbstractEdgeTest {
|
||||
public class TelemetryEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testTimeseriesWithFailures() throws Exception {
|
||||
@ -37,7 +37,7 @@ import java.util.Optional;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseUserEdgeTest extends AbstractEdgeTest {
|
||||
public class UserEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Autowired
|
||||
private BCryptPasswordEncoder passwordEncoder;
|
||||
@ -30,7 +30,7 @@ import org.thingsboard.server.gen.edge.v1.WidgetsBundleUpdateMsg;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseWidgetEdgeTest extends AbstractEdgeTest {
|
||||
public class WidgetEdgeTest extends AbstractEdgeTest {
|
||||
|
||||
@Test
|
||||
public void testWidgetsBundleAndWidgetType() throws Exception {
|
||||
@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAdminSettingsServiceTest extends AbstractServiceTest {
|
||||
public class AdminSettingsServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
AdminSettingsService adminSettingsService;
|
||||
@ -44,7 +44,7 @@ import java.util.concurrent.ExecutionException;
|
||||
import static org.thingsboard.server.common.data.alarm.AlarmCommentType.OTHER;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAlarmCommentServiceTest extends AbstractServiceTest {
|
||||
public class AlarmCommentServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
AlarmService alarmService;
|
||||
@ -63,7 +63,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAlarmServiceTest extends AbstractServiceTest {
|
||||
public class AlarmServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
AlarmService alarmService;
|
||||
@ -24,7 +24,7 @@ import org.thingsboard.server.dao.usagerecord.ApiUsageStateService;
|
||||
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseApiUsageStateServiceTest extends AbstractServiceTest {
|
||||
public class ApiUsageStateServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
ApiUsageStateService apiUsageStateService;
|
||||
@ -41,7 +41,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAssetProfileServiceTest extends AbstractServiceTest {
|
||||
public class AssetProfileServiceTest extends AbstractServiceTest {
|
||||
|
||||
private IdComparator<AssetProfile> idComparator = new IdComparator<>();
|
||||
private IdComparator<AssetProfileInfo> assetProfileInfoIdComparator = new IdComparator<>();
|
||||
@ -41,7 +41,7 @@ import java.util.List;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseAssetServiceTest extends AbstractServiceTest {
|
||||
public class AssetServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
AssetService assetService;
|
||||
@ -42,7 +42,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseCustomerServiceTest extends AbstractServiceTest {
|
||||
public class CustomerServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
CustomerService customerService;
|
||||
@ -44,7 +44,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDashboardServiceTest extends AbstractServiceTest {
|
||||
public class DashboardServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
CustomerService customerService;
|
||||
@ -42,7 +42,7 @@ import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceCredentialsCacheTest extends AbstractServiceTest {
|
||||
public class DeviceCredentialsCacheTest extends AbstractServiceTest {
|
||||
|
||||
private final String CREDENTIALS_ID_1 = StringUtils.randomAlphanumeric(20);
|
||||
private final String CREDENTIALS_ID_2 = StringUtils.randomAlphanumeric(20);
|
||||
@ -30,7 +30,7 @@ import org.thingsboard.server.dao.device.DeviceService;
|
||||
import org.thingsboard.server.dao.exception.DataValidationException;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceCredentialsServiceTest extends AbstractServiceTest {
|
||||
public class DeviceCredentialsServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
DeviceCredentialsService deviceCredentialsService;
|
||||
@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceProfileServiceTest extends AbstractServiceTest {
|
||||
public class DeviceProfileServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
DeviceProfileService deviceProfileService;
|
||||
@ -58,7 +58,7 @@ import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseDeviceServiceTest extends AbstractServiceTest {
|
||||
public class DeviceServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
CustomerService customerService;
|
||||
@ -43,7 +43,7 @@ import java.util.List;
|
||||
import static org.apache.commons.lang3.time.DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseEdgeEventServiceTest extends AbstractServiceTest {
|
||||
public class EdgeEventServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
EdgeEventService edgeEventService;
|
||||
@ -48,7 +48,7 @@ import java.util.List;
|
||||
import static org.thingsboard.server.dao.model.ModelConstants.NULL_UUID;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseEdgeServiceTest extends AbstractServiceTest {
|
||||
public class EdgeServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
CustomerService customerService;
|
||||
@ -26,7 +26,7 @@ import org.thingsboard.server.dao.rule.RuleChainService;
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseEntityServiceRegistryTest extends AbstractServiceTest {
|
||||
public class EntityServiceRegistryTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
EntityServiceRegistry entityServiceRegistry;
|
||||
@ -98,7 +98,7 @@ import static org.junit.Assert.assertEquals;
|
||||
|
||||
@Slf4j
|
||||
@DaoSqlTest
|
||||
public class BaseEntityServiceTest extends AbstractServiceTest {
|
||||
public class EntityServiceTest extends AbstractServiceTest {
|
||||
|
||||
static final int ENTITY_COUNT = 5;
|
||||
|
||||
@ -32,7 +32,7 @@ import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseOAuth2ConfigTemplateServiceTest extends AbstractServiceTest {
|
||||
public class OAuth2ConfigTemplateServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
protected OAuth2ConfigTemplateService oAuth2ConfigTemplateService;
|
||||
@ -45,7 +45,7 @@ import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseOAuth2ServiceTest extends AbstractServiceTest {
|
||||
public class OAuth2ServiceTest extends AbstractServiceTest {
|
||||
private static final OAuth2Info EMPTY_PARAMS = new OAuth2Info(false, Collections.emptyList());
|
||||
|
||||
@Autowired
|
||||
@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
import static org.thingsboard.server.common.data.ota.OtaPackageType.FIRMWARE;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseOtaPackageServiceTest extends AbstractServiceTest {
|
||||
public class OtaPackageServiceTest extends AbstractServiceTest {
|
||||
|
||||
public static final String TITLE = "My firmware";
|
||||
private static final String FILE_NAME = "filename.txt";
|
||||
@ -44,7 +44,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseQueueServiceTest extends AbstractServiceTest {
|
||||
public class QueueServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
TenantProfileService tenantProfileService;
|
||||
@ -40,7 +40,7 @@ import static org.mockito.Mockito.when;
|
||||
import static org.thingsboard.server.common.data.CacheConstants.RELATIONS_CACHE;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseRelationCacheTest extends AbstractServiceTest {
|
||||
public class RelationCacheTest extends AbstractServiceTest {
|
||||
|
||||
private static final EntityId ENTITY_ID_FROM = new DeviceId(UUID.randomUUID());
|
||||
private static final EntityId ENTITY_ID_TO = new DeviceId(UUID.randomUUID());
|
||||
@ -43,7 +43,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseRelationServiceTest extends AbstractServiceTest {
|
||||
public class RelationServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
RelationService relationService;
|
||||
@ -45,7 +45,7 @@ import java.util.List;
|
||||
* Created by igor on 3/13/18.
|
||||
*/
|
||||
@DaoSqlTest
|
||||
public class BaseRuleChainServiceTest extends AbstractServiceTest {
|
||||
public class RuleChainServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
EdgeService edgeService;
|
||||
@ -46,7 +46,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTenantProfileServiceTest extends AbstractServiceTest {
|
||||
public class TenantProfileServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
TenantProfileService tenantProfileService;
|
||||
@ -83,7 +83,7 @@ import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseTenantServiceTest extends AbstractServiceTest {
|
||||
public class TenantServiceTest extends AbstractServiceTest {
|
||||
|
||||
@SpyBean
|
||||
TenantDao tenantDao;
|
||||
@ -617,7 +617,7 @@ public class BaseTenantServiceTest extends AbstractServiceTest {
|
||||
|
||||
private OtaPackage createAndSaveOtaPackageFor(Tenant tenant, DeviceProfile deviceProfile) {
|
||||
return otaPackageService.saveOtaPackage(
|
||||
BaseOtaPackageServiceTest.createFirmware(
|
||||
OtaPackageServiceTest.createFirmware(
|
||||
tenant.getId(), "2", deviceProfile.getId())
|
||||
);
|
||||
}
|
||||
@ -41,7 +41,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseUserServiceTest extends AbstractServiceTest {
|
||||
public class UserServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
CustomerService customerService;
|
||||
@ -37,7 +37,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseWidgetTypeServiceTest extends AbstractServiceTest {
|
||||
public class WidgetTypeServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
WidgetsBundleService widgetsBundleService;
|
||||
@ -34,7 +34,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@DaoSqlTest
|
||||
public class BaseWidgetsBundleServiceTest extends AbstractServiceTest {
|
||||
public class WidgetsBundleServiceTest extends AbstractServiceTest {
|
||||
|
||||
@Autowired
|
||||
WidgetsBundleService widgetsBundleService;
|
||||
@ -27,7 +27,7 @@ import org.thingsboard.server.common.data.page.PageData;
|
||||
import org.thingsboard.server.common.data.page.PageLink;
|
||||
import org.thingsboard.server.dao.AbstractJpaDaoTest;
|
||||
import org.thingsboard.server.dao.service.AbstractServiceTest;
|
||||
import org.thingsboard.server.dao.service.BaseTenantProfileServiceTest;
|
||||
import org.thingsboard.server.dao.service.TenantProfileServiceTest;
|
||||
import org.thingsboard.server.dao.tenant.TenantDao;
|
||||
import org.thingsboard.server.dao.tenant.TenantProfileDao;
|
||||
|
||||
@ -54,7 +54,7 @@ public class JpaTenantDaoTest extends AbstractJpaDaoTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
tenantProfile = tenantProfileDao.save(TenantId.SYS_TENANT_ID, BaseTenantProfileServiceTest.createTenantProfile("default tenant profile"));
|
||||
tenantProfile = tenantProfileDao.save(TenantId.SYS_TENANT_ID, TenantProfileServiceTest.createTenantProfile("default tenant profile"));
|
||||
assertThat(tenantProfile).as("tenant profile").isNotNull();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user