<commit_before>﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using Xunit;

namespace Microsoft.ApiDesignGuidelines.Analyzers.UnitTests
{
    public partial class IdentifiersShouldNotMatchKeywordsTests
    {
        [Fact]
        public void CSharpDiagnosticForKeywordNamedPublicType()
        {
            VerifyCSharp(@"
public class @class {}
",
                GetCSharpResultAt(2, 14, IdentifiersShouldNotMatchKeywordsAnalyzer.TypeRule, "class", "class"));
        }

        [Fact]
        public void BasicDiagnosticForKeywordNamedPublicType()
        {
            VerifyBasic(@"
Public Class [Class]
End Class
",
                GetBasicResultAt(2, 14, IdentifiersShouldNotMatchKeywordsAnalyzer.TypeRule, "Class", "Class"));
        }

        [Fact]
        public void CSharpNoDiagnosticForCaseSensitiveKeywordNamedPublicTypeWithDifferentCasing()
        {
            VerifyCSharp(@"
public class iNtErNaL {}
");<commit_msg>CA1716: Add a missing comment<commit_after>﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using Xunit;

namespace Microsoft.ApiDesignGuidelines.Analyzers.UnitTests
{
    /// <summary>
    /// Contains those unit tests for the IdentifiersShouldNotMatchKeywords analyzer that
    /// pertain to the TypeRule, which applies to the names of types.
    /// </summary>
    public partial class IdentifiersShouldNotMatchKeywordsTests
    {
        [Fact]
        public void CSharpDiagnosticForKeywordNamedPublicType()
        {
            VerifyCSharp(@"
public class @class {}
",
                GetCSharpResultAt(2, 14, IdentifiersShouldNotMatchKeywordsAnalyzer.TypeRule, "class", "class"));
        }

        [Fact]
        public void BasicDiagnosticForKeywordNamedPublicType()
        {
            VerifyBasic(@"
Public Class [Class]
End Class
",
                GetBasicResultAt(2, 14, IdentifiersShouldNotMatchKeywordsAnalyzer.TypeRule, "Class", "Class"));
        }

        [Fact]
        public void CSharpNoDiagnosticForCaseSensitiveKeywordNamedPublicTypeWithDifferentCasing()
        {
            VerifyCSharp(@"
public class iNtErNaL {}
");
{'fraction_non_alphanumeric': 0.08358466178371392, 'fraction_numerical': 0.008616975441619991, 'mean_word_length': 2.9692307692307693, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '425297', 'n_tokens_mistral': 644, 'n_tokens_neox': 618, 'n_words': 160}