What steps will reproduce the problem? 1. I tried mock DropInfo to test IDropTarget implementation using Moq
var fakeDropInfo = new Mock<DropInfo>(); fakeDropInfo.SetupGet(d => d.Data).Returns(file); fakeDropInfo.SetupGet(d => d.TargetItem).Returns(targetDataTag);
(dialog as IDropTarget).Drop(fakeDropInfo.Object);
- I get the error :
Invalid setup on a non-virtual (overridable in VB) member: d => d.Data
What is the expected output? What do you see instead?
I think the 'DropInfo' class should be testable. Currently it is not implementing any interface and not marked by virtual.
Comment #1
Posted on Sep 20, 2012 by Massive ElephantI am so sorry that I didn't look at the latest source code. I didn't know that the DropInfo has changed to implement IDropInfo interface.
I want to delete this issue but I can't find how to do it. Sorry again.
Status: New
Labels:
Type-Defect
Priority-Medium