Ejemplo n.º 1
0
        internal void When_file_name_matches_rules_it_must_be_skipped()
        {
            // Arrange
            ParsedSourceCode source = new EmptySourceCodeBuilder()
                                      .InFileNamed("MainForm.cs")
                                      .Build();

            // Act and assert
            VerifyGuidelineDiagnostic(source);
        }
Ejemplo n.º 2
0
        internal void When_file_name_contains_generic_arity_it_must_be_reported()
        {
            // Arrange
            ParsedSourceCode source = new EmptySourceCodeBuilder()
                                      .InFileNamed("ValueContainer`1.cs")
                                      .WithCode("[||]")
                                      .Build();

            // Act and assert
            VerifyGuidelineDiagnostic(source,
                                      "File 'ValueContainer`1.cs' should be named without generic arity.");
        }
Ejemplo n.º 3
0
        internal void When_file_name_contains_underscore_it_must_be_reported()
        {
            // Arrange
            ParsedSourceCode source = new EmptySourceCodeBuilder()
                                      .InFileNamed("Main_Form.cs")
                                      .WithCode("[||]")
                                      .Build();

            // Act and assert
            VerifyGuidelineDiagnostic(source,
                                      "File 'Main_Form.cs' should be named without underscores.");
        }
Ejemplo n.º 4
0
        internal void When_file_name_starts_with_lowercase_it_must_be_reported()
        {
            // Arrange
            ParsedSourceCode source = new EmptySourceCodeBuilder()
                                      .InFileNamed("mainForm.cs")
                                      .WithCode("[||]")
                                      .Build();

            // Act and assert
            VerifyGuidelineDiagnostic(source,
                                      "File 'mainForm.cs' should be named using Pascal casing.");
        }