private async Task AddAllFolders(string rootName) { var rootFolder = new FolderViewModel(rootName, _folderTree); await rootFolder.Save(); var infolder = await rootFolder.AddChild("In"); this._emailProvider.InFolderId= infolder.Id; var outFolder = await rootFolder.AddChild("Out"); this._emailProvider.OutFolderId= outFolder.Id; var sentFolder = await rootFolder.AddChild("Sent"); this._emailProvider.SentFolderId = sentFolder.Id; var conceptsFolder = await rootFolder.AddChild("Concepts"); this._emailProvider.ConceptsFolderId = conceptsFolder.Id; }
public async Task FolderVMaddChild() { var tree = new FolderTreeViewModel(); var testFolder = new FolderViewModel("TestParent", tree); await testFolder.Save(); var test = await testFolder.AddChild("testChild"); await test.Save(); Assert.IsNotNull(test, "Folder niet aangemaakt"); Assert.AreEqual("testChild", testFolder.Children[0].Name, false); }
public async Task FolderVmRecusie1() { var tree = new FolderTreeViewModel(); var testFolder = new FolderViewModel("TestParent", tree); await testFolder.Save(); var testChild = await testFolder.AddChild(testFolder); Assert.IsNotNull(testFolder, "Folder niet aangemaakt"); Assert.IsNull(testFolder.Parent, "Parent recursie!"); Assert.AreEqual(testFolder.Children.Count, 0, "Child recursie!"); }
public async Task FolderVmparent1() { var tree = new FolderTreeViewModel(); var parentFolder = new FolderViewModel("TestParent", tree); await parentFolder.Save(); var testFolder = await parentFolder.AddChild("Test"); Assert.IsNotNull(testFolder, "Folder niet aangemaakt"); Assert.IsNotNull(parentFolder, "parentFolder niet aangemaakt"); Assert.AreEqual<int>(0, testFolder.Children.Count, "Child ten onrechte aangemaakt"); Assert.AreEqual("Test", parentFolder.Children[0].Name, false); }
public async Task FolderVmRecusie1() { var tree = new FolderTreeViewModel(); var testFolder = new FolderViewModel("TestParent", tree); await testFolder.Save(); var testChild = await testFolder.AddChild(testFolder); Assert.IsNotNull(testFolder, "Folder niet aangemaakt"); Assert.IsNull(testFolder.Parent, "Parent recursie!"); Assert.AreEqual(testFolder.Children.Count, 0, "Child recursie!"); }
public async Task FolderVMaddChild() { var tree = new FolderTreeViewModel(); var testFolder = new FolderViewModel("TestParent", tree); await testFolder.Save(); var test = await testFolder.AddChild("testChild"); await test.Save(); Assert.IsNotNull(test, "Folder niet aangemaakt"); Assert.AreEqual("testChild", testFolder.Children[0].Name, false); }
public async Task FolderVmparent1() { var tree = new FolderTreeViewModel(); var parentFolder = new FolderViewModel("TestParent", tree); await parentFolder.Save(); var testFolder = await parentFolder.AddChild("Test"); Assert.IsNotNull(testFolder, "Folder niet aangemaakt"); Assert.IsNotNull(parentFolder, "parentFolder niet aangemaakt"); Assert.AreEqual <int>(0, testFolder.Children.Count, "Child ten onrechte aangemaakt"); Assert.AreEqual("Test", parentFolder.Children[0].Name, false); }