1''' <summary>
2''' "Method calls with no parameters and with parenthesis."
3''' </summary>
4''' <remarks></remarks>
5<TestFixture()> Public Class MethodCall3
6    Private m_Var5 As Integer
7
8    Public Sub New()
9        '
10    End Sub
11
12    Public Sub New(ByVal Var5 As Integer)
13        m_Var5 = Var5
14    End Sub
15
16    <Test()> Public Sub Test1()
17        Assert.AreEqual(Method1().Method2(), 2, "Shared function call through return value of shared function call failed. (Expected 2).")
18    End Sub
19
20    <Test()> Public Sub Test2()
21        Assert.AreEqual(Method2(), 2, "Shared function call failed. (Expected 2).")
22    End Sub
23
24    <Test()> Public Sub Test3()
25        Assert.AreEqual(Method3(), 3, "Instance function call without Me failed. (Expected 3).")
26    End Sub
27
28    <Test()> Public Sub Test4()
29        Assert.AreEqual(Me.Method4(), 4, "Instance function call with Me failed. (Expected 4).")
30    End Sub
31
32    <Test()> Public Sub Test5()
33        Dim var As MethodCall3
34        var = New MethodCall3(5)
35        Assert.AreEqual(var.Method5(), 5, "Instance function call with local variable failed. (Expeced 5).")
36    End Sub
37
38    <Test()> Public Sub Test6()
39        Assert.AreEqual(Method6().Method3(), 3, "Instance function call through return value of a function call failed. (Expected 3).")
40    End Sub
41
42    <Test()> Public Sub Test7()
43        Assert.AreEqual(Method6().Method2(), 2, "Shared function call through return value of instance function call failed. (Expected 2).")
44    End Sub
45
46    <Test()> Public Sub Test8()
47        Assert.AreEqual(Me.Method2(), 2, "Shared function call through Me failed. (Expected 2).")
48    End Sub
49
50    Shared Function Method1() As MethodCall3
51        Return New MethodCall3
52    End Function
53
54    Shared Function Method2() As Integer
55        Return 2
56    End Function
57
58    Function Method3() As Integer
59        Return 3
60    End Function
61
62    Function Method4() As Integer
63        Return 4
64    End Function
65
66    Function Method5() As Integer
67        Return m_Var5
68    End Function
69
70    Function Method6() As MethodCall3
71        Return Me
72    End Function
73End Class