Search in sources :

Example 6 with Meta

use of io.syndesis.server.endpoint.v1.dto.Meta in project syndesis by syndesisio.

the class ConnectionActionHandlerTest method shouldNotContactVerifierForNonDynamicActions.

@Test
public void shouldNotContactVerifierForNonDynamicActions() {
    final ConnectorDescriptor defaultDefinition = new ConnectorDescriptor.Builder().build();
    final Response response = handler.enrichWithMetadata(SALESFORCE_LIMITS, null);
    assertThat(response.getStatus()).isEqualTo(Status.OK.getStatusCode());
    @SuppressWarnings("unchecked") final Meta<ConnectorDescriptor> returnValue = (Meta<ConnectorDescriptor>) response.getEntity();
    assertThat(returnValue.getValue()).isEqualTo(defaultDefinition);
}
Also used : Response(javax.ws.rs.core.Response) ConnectorDescriptor(io.syndesis.common.model.action.ConnectorDescriptor) Meta(io.syndesis.server.endpoint.v1.dto.Meta) Test(org.junit.Test)

Aggregations

ConnectorDescriptor (io.syndesis.common.model.action.ConnectorDescriptor)6 Meta (io.syndesis.server.endpoint.v1.dto.Meta)6 Response (javax.ws.rs.core.Response)6 HystrixInvokableInfo (com.netflix.hystrix.HystrixInvokableInfo)5 DynamicActionMetadata (io.syndesis.common.model.connection.DynamicActionMetadata)5 Test (org.junit.Test)5 Entity (javax.ws.rs.client.Entity)4 HystrixExecutable (com.netflix.hystrix.HystrixExecutable)2 DataShape (io.syndesis.common.model.DataShape)2 DataShapeKinds (io.syndesis.common.model.DataShapeKinds)2 ConnectorAction (io.syndesis.common.model.action.ConnectorAction)2 ConfigurationProperty (io.syndesis.common.model.connection.ConfigurationProperty)2 Connector (io.syndesis.common.model.connection.Connector)2 EncryptionComponent (io.syndesis.server.dao.manager.EncryptionComponent)2 MetaData (io.syndesis.server.endpoint.v1.dto.MetaData)2 MetadataConfigurationProperties (io.syndesis.server.verifier.MetadataConfigurationProperties)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Status (javax.ws.rs.core.Response.Status)2 Api (io.swagger.annotations.Api)1