private static async Task <TResult> CallAsync <TResult>(StorageAccount account, Type programType, string methodName, Action <TaskCompletionSource <TResult> > setTaskSource) { IDictionary <string, object> arguments = null; return(await FunctionalTest.CallAsync <TResult>(account, programType, programType.GetMethod(methodName), arguments, setTaskSource)); }
private async Task <TResult> CallAsync <TResult>(Type programType, string methodName, Action <TaskCompletionSource <TResult> > setTaskSource) { IDictionary <string, object> arguments = null; return(await FunctionalTest.CallAsync <TResult>(b => ConfigureStorage(b), programType, programType.GetMethod(methodName), arguments, setTaskSource)); }
private async Task <TResult> CallQueueTriggerAsync <TResult>(object message, Type programType, Action <TaskCompletionSource <TResult> > setTaskSource) { var method = programType.GetMethod("Run"); Assert.NotNull(method); var result = await FunctionalTest.CallAsync <TResult>(account, programType, method, new Dictionary <string, object> { { "message", message } }, setTaskSource); return(result); }
public async Task CloudStorageAccount_CanCall() { // Arrange CloudStorageAccount realAccount = CloudStorageAccount.DevelopmentStorageAccount; StorageAccount account = StorageAccount.New(realAccount); // Act var t = typeof(CloudStorageAccountProgram); var result = await FunctionalTest.CallAsync <CloudStorageAccount>( account, t, t.GetMethod(nameof(CloudStorageAccountProgram.BindToCloudStorageAccount)), null, // args (s) => CloudStorageAccountProgram.TaskSource = s); // Assert Assert.NotNull(result); Assert.Same(realAccount, result); }
private async Task CallAsync(Type programType, string methodName, IDictionary <string, object> arguments, params Type[] customExtensions) { await FunctionalTest.CallAsync(b => ConfigureStorage(b), programType, programType.GetMethod(methodName), arguments, customExtensions); }
private async Task CallAsync(Type programType, string methodName, params Type[] customExtensions) { await FunctionalTest.CallAsync(b => ConfigureStorage(b), programType, programType.GetMethod(methodName), null, customExtensions); }
private static async Task CallAsync(StorageAccount account, Type programType, string methodName, IDictionary <string, object> arguments, params Type[] customExtensions) { await FunctionalTest.CallAsync(account, programType, programType.GetMethod(methodName), arguments, customExtensions); }
private static async Task CallAsync(StorageAccount account, Type programType, string methodName, params Type[] customExtensions) { await FunctionalTest.CallAsync(account, programType, programType.GetMethod(methodName), null, customExtensions); }