Exemplo n.º 1
0
        private FunctionInvocationPage FunctionWithQueueArgumentsTest(MethodInfo function)
        {
            InvocationDetails invocation = _storageAccount
                                           .MethodInfoToInvocations(function)
                                           .Single();

            FunctionInvocationPage page      = Dashboard.GoToFunctionInvocationPage(invocation.Id);
            FunctionArgumentsTable arguments = page.DetailsSection.ArgumentsTable;

            FunctionArgumentsTableRow[] rows = arguments
                                               .BodyRows
                                               .Cast <FunctionArgumentsTableRow>()
                                               .ToArray();

            string queueName = string.Format("queue-{0}-in", function.Name.ToLowerInvariant());

            Assert.Equal(string.Format("New queue message detected on '{0}'.", queueName), page.TriggerReason);

            FunctionArgumentsTableRow argumentRow = rows[0];

            Assert.Equal("input", argumentRow.Name);
            Assert.Equal(POCO.JsonSample, argumentRow.Value.TextValue);
            Assert.Equal(string.Empty, argumentRow.Notes);

            argumentRow = rows[1];
            Assert.Equal("output", argumentRow.Name);
            Assert.Equal(
                QueueArgumentsDisplayTestsFixture.CreateQueueName(function, input: false),
                argumentRow.Value.TextValue);
            Assert.Equal(string.Empty, argumentRow.Notes);

            return(page);
        }
Exemplo n.º 2
0
        private FunctionInvocationPage GetInvocationPage(MethodInfo method)
        {
            InvocationDetails invocation = _storageAccount.MethodInfoToInvocations(method).Single();

            return(Dashboard.GoToFunctionInvocationPage(invocation.Id));
        }