public static async Task ExecuteViaReflectionAsync_TResult___Should_throw_ArgumentException___When_protocol_has_multiple_execute_methods_for_operation() { // Arrange var operation = new ChildReturningOperation(); var protocol = new FamilyReturningProtocol(); // Act var actual = await Record.ExceptionAsync(() => protocol.ExecuteViaReflectionAsync <int>(operation)); // Assert actual.AsTest().Must().BeOfType <ArgumentException>(); actual.Message.AsTest().Must().ContainString(Invariant($"The specified '{nameof(ProtocolExtensionsTest)}.{nameof(FamilyReturningProtocol)}' protocol has more than one returning ExecuteAsync method with a single parameter that the specified '{nameof(ProtocolExtensionsTest)}.{nameof(ChildReturningOperation)}' operation is assignable to AND a return type that is assignable to the specified 'int' return type.")); }
public Task <int> ExecuteAsync(ChildReturningOperation operation) { throw new NotImplementedException(); }
public int Execute(ChildReturningOperation operation) { throw new NotImplementedException(); }