コード例 #1
0
        public void Should_Set_FileName()
        {
            var sut = new ProductPresenter(mockProductView.Object, mockProductRepo.Object, mockOpenFileDialog.Object);

            mockOpenFileDialog.Setup(o => o.ShowDialog()).Returns(DialogResult.OK);
            sut.BrowseForFileName();
            mockProductView.Verify(x => x.SetFileName(It.IsAny <string>()), Times.Once());
        }