提交 ebf4437e 编写于 作者: C CyrusNajmabadi

Add test.

上级 cd21f84c
......@@ -2232,6 +2232,52 @@ End Namespace
</text>.Value.Replace(vbLf, vbCrLf))
End Function
<WorkItem(11461, "https://github.com/dotnet/roslyn/issues/11461")>
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsGenerateMethod)>
Public Async Function TestGenerateMethodOffOfExistingProperty() As Task
Await TestAsync(
<text>
Imports System
Public NotInheritable Class Repository
Shared ReadOnly Property agreementtype As AgreementType
Get
End Get
End Property
End Class
Public Class Agreementtype
End Class
Class C
Shared Sub TestError()
[|Repository.AgreementType.NewFunction|]("", "")
End Sub
End Class
</text>.Value.Replace(vbLf, vbCrLf),
<text>
Imports System
Public NotInheritable Class Repository
Shared ReadOnly Property agreementtype As AgreementType
Get
End Get
End Property
End Class
Public Class Agreementtype
Friend Sub NewFunction(v1 As String, v2 As String)
Throw New NotImplementedException()
End Sub
End Class
Class C
Shared Sub TestError()
Repository.AgreementType.NewFunction("", "")
End Sub
End Class</text>.Value.Replace(vbLf, vbCrLf))
End Function
Public Class GenerateConversionTests
Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册