Skip to content

Commit 3c8fd5a

Browse files
Copilotjaviercn
andcommitted
Remove irrelevant test that checks FormName parameter
Co-authored-by: javiercn <[email protected]>
1 parent 0305c3f commit 3c8fd5a

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

src/Components/Analyzers/test/SupplyParameterFromFormAnalyzerTest.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,33 +146,6 @@ class InputModel
146146
VerifyCSharpDiagnostic(test, expected);
147147
}
148148

149-
[Fact]
150-
public void ReportsWarningWithFormNameSpecified()
151-
{
152-
var test = $@"
153-
namespace ConsoleApplication1
154-
{{
155-
using {typeof(ParameterAttribute).Namespace};
156-
class TestComponent : ComponentBase
157-
{{
158-
[SupplyParameterFromForm(FormName = ""main-form"")] public string MyProperty {{ get; set; }} = ""default"";
159-
}}
160-
}}" + TestDeclarations;
161-
162-
var expected = new DiagnosticResult
163-
{
164-
Id = "BL0008",
165-
Message = "Property 'ConsoleApplication1.TestComponent.MyProperty' has [SupplyParameterFromForm] and a property initializer. This can be overwritten with null during form posts.",
166-
Severity = DiagnosticSeverity.Warning,
167-
Locations = new[]
168-
{
169-
new DiagnosticResultLocation("Test0.cs", 7, 77)
170-
}
171-
};
172-
173-
VerifyCSharpDiagnostic(test, expected);
174-
}
175-
176149
[Fact]
177150
public void WorksWithInheritedComponentBase()
178151
{

0 commit comments

Comments
 (0)