public async Task TableEntity_IfBoundToExistingPoco_BindsUsingNativeTableTypes()
        {
            // Arrange
            byte[]         expectedValue = new byte[] { 0x12, 0x34 };
            StorageAccount account       = CreateFakeStorageAccount();
            CloudQueue     triggerQueue  = await account.CreateQueueAsync(TriggerQueueName);

            await triggerQueue.AddMessageAsync(new CloudQueueMessage("ignore"));

            CloudTable table = await account.CreateTableAsync(TableName);

            Dictionary <string, EntityProperty> properties = new Dictionary <string, EntityProperty>
            {
                { "Value", new EntityProperty(expectedValue) }
            };

            table.Insert(new DynamicTableEntity(PartitionKey, RowKey, etag: null, properties: properties));

            // Act
            PocoWithByteArrayValue result = RunTrigger <PocoWithByteArrayValue>(account,
                                                                                typeof(BindToPocoWithByteArrayValueProgram), (s) => BindToPocoWithByteArrayValueProgram.TaskSource = s);

            // Assert
            Assert.NotNull(result);
            Assert.Equal(expectedValue, result.Value);
        }
 public static void Run([QueueTrigger(TriggerQueueName)] CloudQueueMessage message,
                        [Table(TableName, PartitionKey, RowKey)] PocoWithByteArrayValue entity)
 {
     entity.Value = message.AsBytes;
 }
 public static void Run([QueueTrigger(TriggerQueueName)] CloudQueueMessage ignore,
                        [Table(TableName, PartitionKey, RowKey)] PocoWithByteArrayValue entity)
 {
     TaskSource.TrySetResult(entity);
 }
 public static void Run([Table(TableNameExpression, PartitionKey, RowKey)] PocoWithByteArrayValue entity, byte[] expectedValue)
 {
     entity.Value = expectedValue;
 }
 public void Run([Table(TableNameExpression, PartitionKey, RowKey)] PocoWithByteArrayValue entity)
 {
     Entity = entity;
 }