public async Task SetEntityTagsAsync_ShouldWorkProperly_WithNonExistingTags() { var newTags = new List <string> { "non-existing-awesome-tag-a", "non-existing-awesome-tag-b" }; await _entityTagManager.SetEntityTagsAsync(_cmsKitTestData.EntityType1, _cmsKitTestData.EntityId1, newTags); var tags = await _tagRepository.GetAllRelatedTagsAsync(_cmsKitTestData.EntityType1, _cmsKitTestData.EntityId1); tags.ShouldNotBeNull(); tags.ShouldNotBeEmpty(); tags.ForEach(tag => newTags.Contains(tag.Name)); }
public virtual async Task SetEntityTagsAsync(EntityTagSetDto input) { var definition = await TagDefinitionStore.GetTagEntityTypeDefinitionAsync(input.EntityType); await CheckPolicyAsync(definition.UpdatePolicy); await EntityTagManager.SetEntityTagsAsync(input.EntityType, input.EntityId, input.Tags); }