Hi,
I am facing issue, while calling a Generic method with Private accessor. Below is my sample method which, i would like to Call.
private void PopulateCollection<T>(List<IDataItem> fromCollection, ObservableCollection<T> toCollection){ //some code }
And my Test method is as below,
[TestMethod]public void TestPopulateCollection(){ var testInstance = new TestVM(); var privateInstance = new PrivateAccessor(testInstance); //declare and set required parameters here for fromCollection & toCollection privateInstance.CallMethod("PopulateCollection", fromCollection, toCollection); //Assert}
The above code throws exception, "Member not found".
Is there a possible resolution for it?
Thank you,
Sagar