Skip to content

Commit 878fae7

Browse files
committed
tests: add test case for different property names in interface and implementation
1 parent 1b26b87 commit 878fae7

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

Tests/TestData/MultiFileCharacterization/SourceFiles/VbLibrary/Module1.vb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Imports System
2+
Imports VbNetStandardLib
23

34
Module Module1
45
Private dict As New Dictionary(Of Integer, Integer)
@@ -10,6 +11,11 @@ Module Module1
1011

1112
Sub Main()
1213
Console.Write(AClass.NestedEnum.First)
14+
15+
Dim interfaceInstance As AnInterface = New AnInterfaceImplementation
16+
Dim classInstance As New AnInterfaceImplementation
17+
Console.WriteLine(interfaceInstance.AnInterfaceProperty)
18+
Console.WriteLine(classInstance.APropertyWithDifferentNameThanPropertyFromInterface)
1319
End Sub
1420

1521
End Module

Tests/TestData/MultiFileCharacterization/SourceFiles/VbLibrary/VbLibrary.vbproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,11 @@
110110
</None>
111111
<None Include="App.config" />
112112
</ItemGroup>
113+
<ItemGroup>
114+
<ProjectReference Include="..\VbNetStandardLib\VbNetStandardLib.vbproj">
115+
<Project>{fbfbe639-a532-408a-960d-288e05feeb0e}</Project>
116+
<Name>VbNetStandardLib</Name>
117+
</ProjectReference>
118+
</ItemGroup>
113119
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
114120
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Public Interface AnInterface
2+
ReadOnly Property AnInterfaceProperty As String
3+
End Interface
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Public Class AnInterfaceImplementation
2+
Implements AnInterface
3+
4+
Public ReadOnly Property APropertyWithDifferentNameThanPropertyFromInterface As String Implements AnInterface.AnInterfaceProperty
5+
Get
6+
Return "Const"
7+
End Get
8+
End Property
9+
End Class

0 commit comments

Comments
 (0)