public void SameVisualSource() { var captureImageMock = new Mock <ICaptureImageService>(); var captureImageService = captureImageMock.Object; var imageProvider = new ImageProvider(WeakReferenceMessenger.Default, captureImageService); var dropTarget = new ImageDropTarget(captureImageService, imageProvider); var mock = new Mock <IDropInfo>(); var elm = new ListView(); mock.SetupGet(d => d.VisualTarget).Returns(elm); var dragInfoMock = new Mock <IDragInfo>(); dragInfoMock.SetupGet(d => d.VisualSource).Returns(elm); mock.SetupGet(d => d.DragInfo).Returns(dragInfoMock.Object); dropTarget.DragOver(mock.Object); dropTarget.Drop(mock.Object); mock.VerifySet(d => d.NotHandled = It.IsAny <bool>(), Times.Never()); }
public ImageDropTarget(ICaptureImageService captureImageService, ImageProvider imageProvider, bool allowOtherDrop) { this.captureImageService = captureImageService; this.imageProvider = imageProvider; this.AllowOtherDrop = allowOtherDrop; }
public ImageDropTarget(ICaptureImageService captureImageService, ImageProvider imageProvider) : this(captureImageService, imageProvider, false) { }