StaticCall() public static method

public static StaticCall ( ) : void
return void
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);
        }