示例#1
0
 protected ThrowStatementSyntax ThrowMockMissingStatement(string mockType)
 {
     return(F.ThrowStatement(F.ObjectCreationExpression(TypesForSymbols.MockMissingException())
                             .WithExpressionsAsArgumentList(
                                 F.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, TypesForSymbols.MockType(),
                                                          F.IdentifierName(mockType)),
                                 F.LiteralExpression(SyntaxKind.StringLiteralExpression, F.Literal(ClassSymbol.Name)),
                                 F.LiteralExpression(SyntaxKind.StringLiteralExpression, F.Literal(InterfaceSymbol.Name)),
                                 F.LiteralExpression(SyntaxKind.StringLiteralExpression, F.Literal(Symbol.Name)),
                                 F.LiteralExpression(SyntaxKind.StringLiteralExpression, F.Literal(MemberMockName))
                                 )
                             ));
 }