public void Given_MemberInfo_When_ExistsCustomAttribute_Invoked_Then_It_Should_Return_Result(string methodName, string expected) { var method = typeof(FakeHttpTrigger).GetMethod(methodName, BindingFlags.Public | BindingFlags.Instance); var result = FunctionNameAttributeExtensions.GetFunctionName(method); result.Should().BeOfType <FunctionNameAttribute>(); result.Name.Should().Be(expected); }
public void Given_Null_When_GetFunctionName_Invoked_Then_It_Should_Throw_Exception() { Action action = () => FunctionNameAttributeExtensions.GetFunctionName(null); action.Should().Throw <ArgumentNullException>(); }