Search in sources :

Example 1 with ComponentType

use of org.thingsboard.server.common.data.plugin.ComponentType in project thingsboard by thingsboard.

the class BaseComponentDescriptorControllerTest method testGetByType.

@Test
public void testGetByType() throws Exception {
    List<ComponentDescriptor> descriptors = readResponse(doGet("/api/components/" + ComponentType.PLUGIN).andExpect(status().isOk()), new TypeReference<List<ComponentDescriptor>>() {
    });
    Assert.assertNotNull(descriptors);
    Assert.assertEquals(AMOUNT_OF_DEFAULT_PLUGINS_DESCRIPTORS, descriptors.size());
    for (ComponentType type : ComponentType.values()) {
        doGet("/api/components/" + type).andExpect(status().isOk());
    }
}
Also used : ComponentType(org.thingsboard.server.common.data.plugin.ComponentType) ComponentDescriptor(org.thingsboard.server.common.data.plugin.ComponentDescriptor) List(java.util.List) Test(org.junit.Test)

Aggregations

List (java.util.List)1 Test (org.junit.Test)1 ComponentDescriptor (org.thingsboard.server.common.data.plugin.ComponentDescriptor)1 ComponentType (org.thingsboard.server.common.data.plugin.ComponentType)1