I have the following loop in RunWebTest method which can work with different type of classes passed to it. Now the issue is that I don't know how to modify this code so I could pass different parameters type to the constructor of the class:
Public Class TestManager
Inherits ThreadedWebTest
Public Property ServerURL As String
Public Overrides Sub Run()
RunWebTest(New Login(Users.CustomerTradeAdvanced))
RunWebTest(New CustomerCreate)
RunWebTest(New Logout)
End Sub
Private Sub RunWebTest(Of WebTestType)(test As WebTestType)
For Each r As WebTestRequest In IncludeWebTest(GetType(WebTestType).GetConstructor(New System.Type() {}).Invoke(New Object() {}), False)
MyBase.Send(r)
Next
End Sub
End Class
I'd appreciate your help