use of com.microsoft.azure.sdk.iot.deps.transport.amqp.AmqpMessage in project azure-iot-sdk-java by Azure.
the class AmqpDeviceOperationsTest method ReceiverMessageFromLinkReceiverLinkNull.
@Test
public void ReceiverMessageFromLinkReceiverLinkNull() throws IOException {
// Arrange
AmqpDeviceOperations amqpDeviceOperation = new AmqpDeviceOperations();
new NonStrictExpectations() {
{
}
};
// Act
AmqpMessage result = amqpDeviceOperation.receiverMessageFromLink(TEST_SENDER_LINK_NAME);
// assert
Assert.assertNull(result);
}
use of com.microsoft.azure.sdk.iot.deps.transport.amqp.AmqpMessage in project azure-iot-sdk-java by Azure.
the class AmqpMessageTest method encodeSucceeds.
@Test
public void encodeSucceeds() throws IOException {
AmqpMessage amqpMessage = new AmqpMessage(mockedMessageImpl);
new NonStrictExpectations() {
{
mockedMessageImpl.decode((byte[]) any, 0, 10);
}
};
byte[] data = new byte[10];
amqpMessage.encode(data, 0);
}
use of com.microsoft.azure.sdk.iot.deps.transport.amqp.AmqpMessage in project azure-iot-sdk-java by Azure.
the class AmqpMessageTest method setApplicationPropertySucceeds.
@Test
public void setApplicationPropertySucceeds() {
AmqpMessage amqpMessage = new AmqpMessage(mockedMessageImpl);
new NonStrictExpectations() {
{
mockedMessageImpl.setApplicationProperties((ApplicationProperties) any);
}
};
Map<String, Object> userProperties = new HashMap<>();
amqpMessage.setApplicationProperty(userProperties);
}
use of com.microsoft.azure.sdk.iot.deps.transport.amqp.AmqpMessage in project azure-iot-sdk-java by Azure.
the class AmqpMessageTest method getAmqpBodySucceeds.
@Test
public void getAmqpBodySucceeds() {
AmqpMessage amqpMessage = new AmqpMessage(mockedMessageImpl);
new NonStrictExpectations() {
{
mockedMessageImpl.getBody();
}
};
amqpMessage.getAmqpBody();
}
Aggregations