public bool TestHasResult(string methodName) { // given, when (var methodInfo, var attr) = this.GetParameters(methodName); var testCase = new PropertyInspectorMethodInfo(methodInfo, attr); // then return(testCase.HasResult); }
public async Task <string> TestInvoke(string methodName) { // given (var methodInfo, var attr) = this.GetParameters(methodName); var testCase = new PropertyInspectorMethodInfo(methodInfo, attr); // when var action = new FooStreamDeckAction(); var args = new ActionEventArgs <JObject>() { Payload = JObject.FromObject(new FooPropertyInspectorPayload()) }; var result = await testCase.InvokeAsync(action, args).ConfigureAwait(false); // then Assert.That(action.MethodCallCount[methodName], Is.EqualTo(1)); return(testCase.HasResult ? ((FooPropertyInspectorPayload)result).Source : null); }