-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSA1101CSharp10UnitTests.cs
More file actions
35 lines (31 loc) · 1.21 KB
/
SA1101CSharp10UnitTests.cs
File metadata and controls
35 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) Contributors to the New StyleCop Analyzers project.
// Licensed under the MIT License. See LICENSE in the project root for license information.
namespace StyleCop.Analyzers.Test.CSharp10.ReadabilityRules
{
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using StyleCop.Analyzers.Test.CSharp9.ReadabilityRules;
using Xunit;
using static StyleCop.Analyzers.Test.Verifiers.StyleCopCodeFixVerifier<
StyleCop.Analyzers.ReadabilityRules.SA1101PrefixLocalCallsWithThis,
StyleCop.Analyzers.ReadabilityRules.SA1101CodeFixProvider>;
public partial class SA1101CSharp10UnitTests : SA1101CSharp9UnitTests
{
[Fact]
[WorkItem(3472, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3472")]
public async Task TestExtendedPropertyPatternAsync()
{
var testCode = @"public class Test
{
public Test Inner;
public string Value;
public bool Method(Test arg)
{
return arg is { Inner.Value: """" };
}
}";
await VerifyCSharpDiagnosticAsync(testCode, DiagnosticResult.EmptyDiagnosticResults, CancellationToken.None).ConfigureAwait(true);
}
}
}