示例#1
0
 public async Task AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallAndMultipleStatements()
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(
         $@"Targets\{nameof(EvaluatePropertiesForSimplicityAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallAndMultipleStatements))}.cs",
         new[] { OnlyUseCslaPropertyMethodsInGetSetRuleConstants.DiagnosticId });
 }
示例#2
0
 public async Task AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallButIsNotCslaPropertyMethod()
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(
         $@"Targets\{nameof(EvaluatePropertiesForSimplicityAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallButIsNotCslaPropertyMethod))}.cs",
         new string[0]);
 }
示例#3
0
 public async Task AnalyzeWhenClassIsStereotypeAndHasStaticProperty()
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(
         $@"Targets\{nameof(EvaluatePropertiesForSimplicityAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasStaticProperty))}.cs",
         new string[0]);
 }
示例#4
0
 private static async Task RunAnalysisAsync(string path, string[] diagnosticIds)
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(path, diagnosticIds, null);
 }
示例#5
0
 public async Task AnalyzeWhenClassIsStereotypeAndHasSetterWithMethodCallAndDirectInvocationExpression()
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(
         $@"Targets\{nameof(EvaluatePropertiesForSimplicityAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasSetterWithMethodCallAndDirectInvocationExpression))}.cs",
         new string[0]);
 }
示例#6
0
 public async Task AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallAndReturnButNoDirectInvocationExpression()
 {
     await EvaluatePropertiesForSimplicityAnalyzerTests.RunAnalysisAsync(
         $@"Targets\{nameof(EvaluatePropertiesForSimplicityAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasGetterWithMethodCallAndReturnButNoDirectInvocationExpression))}.cs",
         new[] { OnlyUseCslaPropertyMethodsInGetSetRuleConstants.DiagnosticId });
 }