public async Task Should_read_tags() { var tags = new TagsExport(); var context = CreateRestoreContext(); A.CallTo(() => context.Reader.ReadJsonAttachmentAsync <TagsExport>(A <string> ._)) .Returns(tags); await sut.RestoreAsync(context); A.CallTo(() => tagService.RebuildTagsAsync(appId, TagGroups.Assets, tags)) .MustHaveHappened(); }
public async Task Should_read_tags() { var tags = new Dictionary <string, Tag>(); var context = CreateRestoreContext(); A.CallTo(() => context.Reader.ReadJsonAsync <Dictionary <string, Tag> >(A <string> ._, ct)) .Returns(tags); await sut.RestoreAsync(context, ct); A.CallTo(() => tagService.RebuildTagsAsync(appId.Id, TagGroups.Assets, A <TagsExport> .That.Matches(x => x.Tags == tags))) .MustHaveHappened(); }