public void CheckMethodPageLifecycleHook_Returns_Null_For_Incorrect_Params() { var methodDeclaration = SyntaxFactory .MethodDeclaration( SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword)), SyntaxFactory.Identifier(InitMethodName)); var result = LifecycleManagerService.CheckMethodPageLifecycleHook(methodDeclaration); Assert.IsNull(result); }
public void CheckMethodPageLifecycleHook_Returns_Null_For_Incorrect_Name() { var methodDeclaration = SyntaxFactory .MethodDeclaration( SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.VoidKeyword)), SyntaxFactory.Identifier(IncorrectMethodName)) .AddParameterListParameters( SyntaxFactory.Parameter(SyntaxFactory.Identifier(SenderParamName)).WithType(SyntaxFactory.ParseTypeName(SenderParamType)), SyntaxFactory.Parameter(SyntaxFactory.Identifier(EventArgsParamName)).WithType(SyntaxFactory.ParseTypeName(EventArgsParamType))); var result = LifecycleManagerService.CheckMethodPageLifecycleHook(methodDeclaration); Assert.IsNull(result); }