Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline

This commit is contained in:
BinaryAlley committed 2026-10-02 14:37:23 +03:00
1 parent 0abda472c6
commit 3aadd6de84
157 files changed
+1312 -597

No files matched your search

@@ -22,17 +22,21 @@ public class UpdatePluginSettingsRequestFixture
/// </summary>
/// <param name="pluginId">Optional. The Id of the plugin whose settings are updated.</param>
/// <param name="settings">Optional. The settings to apply to the plugin.</param>
/// <param name="includeSettings">Whether the settings should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="UpdatePluginSettingsRequest"/>.</returns>
public UpdatePluginSettingsRequest Create(
Guid? pluginId = null,
IReadOnlyDictionary<string, string>? settings = null)
IReadOnlyDictionary<string, string>? settings = null,
bool includeSettings = true)
{
return new UpdatePluginSettingsRequest(
pluginId ?? _faker.Random.Guid(),
settings ?? new Dictionary<string, string>
{
[_faker.Lorem.Word()] = _faker.Lorem.Word()
}
includeSettings
? settings ?? new Dictionary<string, string>
{
[_faker.Lorem.Word()] = _faker.Lorem.Word()
}
: null
);
}