AspNet.Mvc.TypedRouting.Test.LinkGeneration.UsualController.StaticCall C# (CSharp) 메소드

StaticCall() 공개 정적인 메소드

public static StaticCall ( ) : void
리턴 void
        public static void StaticCall()
        {
        }

Usage Example

예제 #1
0
        public void Resolve_StaticMethodCall_ThrowsInvalidOperationException()
        {
            // Act
            var exception = Assert.Throws <InvalidOperationException>(() =>
            {
                TestServices.Global.GetService <IExpressionRouteHelper>().Resolve <UsualController>(c => UsualController.StaticCall());
            });

            // Assert
            Assert.Equal("Expression is not valid - expected instance method call but instead received static method call.", exception.Message);
        }