public async Task AnalyzeWhenClassIsStereotypeAndHasNoPublicNoArgumentConstructorAndPublicConstructorWithArguments() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasNoPublicNoArgumentConstructorAndPublicConstructorWithArguments))}.cs", new[] { ConstructorHasParametersConstants.DiagnosticId, PublicNoArgumentConstructorIsMissingConstants.DiagnosticId }, diagnostics => Assert.AreEqual(0, diagnostics[0].Properties.Count)); }
public async Task AnalyzeWhenClassIsStereotypeAndHasPrivateConstructorWithArguments() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasPrivateConstructorWithArguments))}.cs", new[] { PublicNoArgumentConstructorIsMissingConstants.DiagnosticId }, diagnostics => Assert.AreEqual(false.ToString(), diagnostics[0].Properties[PublicNoArgumentConstructorIsMissingConstants.HasNonPublicNoArgumentConstructor])); }
public async Task AnalyzeWhenClassIsBusinessBindingListBaseAndHasPublicConstructorWithArguments() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsBusinessBindingListBaseAndHasPublicConstructorWithArguments))}.cs", new[] { ConstructorHasParametersConstants.DiagnosticId }, diagnostics => Assert.AreEqual(0, diagnostics[0].Properties.Count)); }
public async Task AnalyzeWhenClassIsStereotypeAndHasPublicNoArgumentConstructor() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsStereotypeAndHasPublicNoArgumentConstructor))}.cs", new string[0]); }
public async Task AnalyzeWhenClassIsNotStereotype() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsNotStereotype))}.cs", new string[0]); }
private static async Task RunAnalysisAsync(string path, string[] diagnosticIds) { await CheckConstructorsAnalyzerTests.RunAnalysisAsync(path, diagnosticIds, null); }
public async Task AnalyzeWhenClassIsCommandBaseAndHasPublicConstructorWithArguments() { await CheckConstructorsAnalyzerTests.RunAnalysisAsync( $@"Targets\{nameof(CheckConstructorsAnalyzerTests)}\{(nameof(this.AnalyzeWhenClassIsCommandBaseAndHasPublicConstructorWithArguments))}.cs", new string[0]); }