Moles: Mole a ReadOnly Shared/Static Property

200 views Asked by At

How can I return a different value for MyList using Moles?

Given the following class:

Namespace Test

    Public Class MyTestClass

        Private Sub New()
        End Sub

        Public Shared ReadOnly MyList As New List(Of String)({"SomeValue"})

    End Class

End NameSpace

I've tried to access the shared property from Test.Moles.MMyTestClass but MMyTestClass doesn't contain the member MyList. I also tried to add a behavior to return the value I want, but again, I'm not sure how to access the MyList from the test method.

Thanks!

0

There are 0 answers