public async Task CategoryLockRenameTestAsync() { var newName = RandomUtility.NextIdentifier(); var parentPath = category.Parent.Path; var categoryPath = new CategoryName(parentPath, newName); await category.LockAsync(authentication, string.Empty); await category.RenameAsync(authentication, newName); Assert.AreEqual(categoryPath, category.Path); Assert.AreEqual(newName, category.Name); }
//[TaskMethod(Weight = 10)] public async Task LockAsync(ITableCategory category, TaskContext context) { var authentication = context.Authentication; var comment = RandomUtility.NextString(); if (context.AllowException == false) { if (category.Parent == null) { return; } if (comment == string.Empty) { return; } if (category.IsLocked == true) { return; } } await category.LockAsync(authentication, comment); }