Esempio n. 1
0
 public GivenAFunctionReturnStringAndFakeFileSystem()
 {
     _fileSystemMockBuilder = FileSystemMockBuilder.Create();
     _fileSystemMock        = _fileSystemMockBuilder.Build();
     _userLevelCacheWriter  =
         new UserLevelCacheWriter(
             DOTNET_USER_PROFILE_FOLDER_PATH,
             _fileSystemMock.File,
             _fileSystemMock.Directory);
 }
Esempio n. 2
0
        private static IFileSystem SetupSubjectFileSystem(bool testMockBehaviorIsInSync)
        {
            IFileSystem fileSystem;

            if (testMockBehaviorIsInSync)
            {
                FileSystemMockBuilder temporaryFolder = new FileSystemMockBuilder
                {
                    TemporaryFolder = Path.GetTempPath()
                };
                fileSystem = temporaryFolder.Build();
            }
            else
            {
                fileSystem = new FileSystemWrapper();
            }

            return(fileSystem);
        }