public void CleanEmptyFolders_DeletNotInvoked() { const string FILE = @"c:\myfile.txt"; var fileSystem = new MockFileSystem(new Dictionary <string, MockFileData> { { FILE, new MockFileData("Data") }, { $@"{Path.GetPathRoot(FILE)}temp\", new MockDirectoryData() }, { $@"{Path.GetPathRoot(FILE)}temp2\", new MockDirectoryData() } }); var logger = new Mock <ILogger>(); var obj = new FakeStorageService(fileSystem, logger.Object); var sut = obj.SafeCleanEmptyFolders(Path.GetPathRoot(FILE)); sut.IsSuccess.Should().BeTrue(); fileSystem.File.Exists(FILE).Should().BeTrue(); fileSystem.AllFiles.Count().Should().Be(1); fileSystem.AllDirectories.Count().Should().Be(3); logger.Verify(x => x.Info(It.IsRegex("temp.")), Times.Exactly(2)); }
public void TestsCleanup() { this.navigationService = null; this.localizationService = null; this.storageService = null; this.shellViewModel = null; }
public void TestsCleanup() { this.postService = null; this.commentService = null; this.storageService = null; this.dialogService = null; this.postViewModel = null; }
public void TestsInitialize() { this.navigationService = new FakeNavigationService(); this.localizationService = new FakeLocalizationService(); this.storageService = new FakeStorageService(); this.shellViewModel = new ShellViewModel(this.navigationService, this.localizationService, this.storageService); }
public void TestsInitialize() { this.postService = new FakePostService(); this.commentService = new FakeCommentService(); this.storageService = new FakeStorageService(); this.dialogService = new FakeDialogService(); this.postViewModel = new PostViewModel(this.postService, this.commentService, this.storageService, this.dialogService); }
public void TestsCleanup() { this.storageService = null; this.navigationService = null; this.postService = null; this.localizationService = null; this.dialogService = null; this.homeViewModel = null; }
public void TestsCleanup() { this.boxService = null; this.storageService = null; this.navigationService = null; this.localizationService = null; this.dialogService = null; this.myBoxesViewModel = null; }
public void TestsCleanup() { this.postService = null; this.boxService = null; this.navigationService = null; this.storageService = null; this.dialogService = null; this.boxViewModel = null; }
public void TestsCleanUp() { this.userService = null; this.storageService = null; this.navigationService = null; this.localizationService = null; this.dialogService = null; this.loginViewModel = null; }
public void TestsInitialize() { this.storageService = new FakeStorageService(); this.navigationService = new FakeNavigationService(); this.postService = new FakePostService(); this.localizationService = new FakeLocalizationService(); this.dialogService = new FakeDialogService(); this.homeViewModel = new HomeViewModel(this.storageService, this.navigationService, this.postService, this.localizationService, this.dialogService); }
public void TestsInitialize() { this.boxService = new FakeBoxService(); this.storageService = new FakeStorageService(); this.navigationService = new FakeNavigationService(); this.localizationService = new FakeLocalizationService(); this.dialogService = new FakeDialogService(); this.myBoxesViewModel = new MyBoxesViewModel(this.boxService, this.storageService, this.navigationService, this.localizationService, this.dialogService); }
public void TestsInitialize() { this.postService = new FakePostService(); this.boxService = new FakeBoxService(); this.navigationService = new FakeNavigationService(); this.storageService = new FakeStorageService(); this.dialogService = new FakeDialogService(); this.boxViewModel = new BoxViewModel(this.postService, this.boxService, this.navigationService, this.storageService, this.dialogService); }
public void TestsInitialize() { this.userService = new FakeUserService(); this.storageService = new FakeStorageService(); this.navigationService = new FakeNavigationService(); this.localizationService = new FakeLocalizationService(); this.dialogService = new FakeDialogService(); this.loginViewModel = new LoginViewModel(this.userService, this.storageService, this.navigationService, this.localizationService, this.dialogService); }
public void DeleteFile_DeleteNotInvoked() { const string FILE = @"c:\myfile.txt"; var fileSystem = new MockFileSystem(new Dictionary <string, MockFileData> { { FILE, new MockFileData("Data") } }); var logger = new Mock <ILogger>(); var obj = new FakeStorageService(fileSystem, logger.Object); var sut = obj.DeleteFile(FILE); sut.IsSuccess.Should().BeTrue(); fileSystem.File.Exists(FILE).Should().BeTrue(); fileSystem.AllFiles.Count().Should().Be(1); fileSystem.AllDirectories.Count().Should().Be(1); logger.Verify(x => x.Info($"File.Delete({FILE});"), Times.Once); }