#region ========================================================================= USING ===================================================================================== using Lumina.Plugins.CoverArtArchive.Common.Models.Contracts.Responses; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; #endregion namespace Lumina.Plugins.CoverArtArchive.Fixtures.Common.Models.Contracts.Responses; /// /// Fixture class for the class. /// [ExcludeFromCodeCoverage] internal sealed class CoverArtArchiveArtworkResponseFixture { private readonly CoverArtArchiveImageResponseFixture _coverArtArchiveImageResponseFixture = new(); /// /// Creates a new instance with randomized test data. /// /// Optional. The images of the artwork. /// Whether the images should be included, or forced to . /// A configured instance. public CoverArtArchiveArtworkResponse Create( List? images = null, bool includeImages = true) { return new CoverArtArchiveArtworkResponse { Images = includeImages ? images ?? [.. _coverArtArchiveImageResponseFixture.CreateMany()] : null }; } /// /// Creates multiple instances with randomized test data. /// /// Number of instances to create. /// List of configured instances. public List CreateMany(int count = 3) { return [.. Enumerable.Range(0, count).Select(_ => Create())]; } }