mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline
This commit is contained in:
1 parent
0abda472c6
commit
3aadd6de84
157 files changed
+1312
-597
No files matched your search
+9
-5
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user