public async Task Delete_ItemWithInnerItems() { var rootArr = new Group[] { new Group("Test1".ToCharArray()) { InnerItems = new List <Item>() { new Group("Inner".ToCharArray()) } }, new Group("Test2".ToCharArray()), new Group("Test3".ToCharArray()) }; for (int i = 0; i < rootArr.Length; i++) { await ABSRegistry.AddItemToRootAsync(rootArr[i]); } // Delete the item. await ABSRegistry.DeleteAsync("Test1"); // It shouldn't exist anymore. Assert.IsFalse(await ABSRegistry.ExistsAsync("Test1")); Assert.IsFalse(await ABSRegistry.ExistsAsync("Test1/Inner")); }
public async Task Exists_InRoot_DoesExist() { // Set up the registry. await ABSRegistry.AddItemToRootAsync(new Group("Test1".ToCharArray())); await ABSRegistry.AddItemToRootAsync(new Group("Test2".ToCharArray())); await ABSRegistry.AddItemToRootAsync(new Group("Test3".ToCharArray())); Assert.IsTrue(await ABSRegistry.ExistsAsync("Test1")); Assert.IsTrue(await ABSRegistry.ExistsAsync("/Test1")); }
public async Task Delete_InRoot() { // Set up the registry. await ABSRegistry.AddItemToRootAsync(new Group("Test1".ToCharArray())); await ABSRegistry.AddItemToRootAsync(new Group("Test2".ToCharArray())); await ABSRegistry.AddItemToRootAsync(new Group("Test3".ToCharArray())); // Delete the item. await ABSRegistry.DeleteAsync("Test2"); // It shouldn't exist anymore. Assert.IsFalse(await ABSRegistry.ExistsAsync("Test2")); }
public async Task Exists_MultipleParts_DoesExist() { var rootArr = new Group[] { new Group("Test1".ToCharArray()) { InnerItems = new List <Item>() { new Group("Inner".ToCharArray()) } }, new Group("Test2".ToCharArray()), new Group("Test3".ToCharArray()) }; for (int i = 0; i < rootArr.Length; i++) { await ABSRegistry.AddItemToRootAsync(rootArr[i]); } Assert.IsTrue(await ABSRegistry.ExistsAsync("Test1/Inner")); Assert.IsTrue(await ABSRegistry.ExistsAsync("/Test1/Inner")); }
public async Task Exists_RootItself_DoesExist() { Assert.IsTrue(await ABSRegistry.ExistsAsync("/")); }
public async Task Exists_MultipleParts_DoesNotExist() { Assert.IsFalse(await ABSRegistry.ExistsAsync("Test1/Another")); Assert.IsFalse(await ABSRegistry.ExistsAsync("/Test1/Another")); }
public async Task Exists_InRoot_DoesNotExist() { Assert.IsFalse(await ABSRegistry.ExistsAsync("Test1")); Assert.IsFalse(await ABSRegistry.ExistsAsync("/Test1")); }