コード例 #1
0
        public PathsTests()
        {
            //Arrange
            _commandSystemMock  = new Mock <ICommandSystem>(MockBehavior.Strict);
            this._commandSystem = _commandSystemMock.Object;

            _fileSystemMock  = new Mock <IFileSystem>(MockBehavior.Strict);
            this._fileSystem = _fileSystemMock.Object;

            _commandSystemMock
            .Setup(cs => cs.GetHomeFolder(It.Is <string>(s => s == "~")))
            .Returns("/Users/user");
            this._userFolder = _commandSystem.GetHomeFolder("~");
        }
コード例 #2
0
        public DiskTests()
        {
            //Arrange
            Mock <ICommandSystem> commandSystemMock = new Mock <ICommandSystem>(MockBehavior.Strict);
            ICommandSystem        commandSystem     = commandSystemMock.Object;

            _fileSystemMock  = new Mock <IFileSystem>(MockBehavior.Strict);
            this._fileSystem = _fileSystemMock.Object;

            commandSystemMock
            .Setup(cs => cs.GetHomeFolder(It.Is <string>(s => s == "~")))
            .Returns("/Users/user");
            this._userFolder = commandSystem.GetHomeFolder("~");

            _notificationSystemMock  = new Mock <INotificationSystem>(MockBehavior.Strict);
            this._notificationSystem = _notificationSystemMock.Object;
        }