-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathUnitTestExExtensions.RefData.cs
More file actions
19 lines (18 loc) · 1 KB
/
Copy pathUnitTestExExtensions.RefData.cs
File metadata and controls
19 lines (18 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma warning disable IDE0130 // Namespace does not match folder structure; by design.
namespace UnitTestEx;
#pragma warning restore IDE0130 // Namespace does not match folder structure
public static partial class UnitTestExExtensions
{
/// <summary>
/// Extends the reference data collection with additional items for testing purposes.
/// </summary>
/// <typeparam name="TRefColl">The <see cref="IReferenceDataCollection"/> <see cref="Type"/>.</typeparam>
/// <param name="referenceDataCollection">The reference data collection to extend.</param>
/// <param name="additionalItems">The additional items to add to the collection.</param>
/// <returns>The extended reference data collection.</returns>
public static TRefColl ExtendForTesting<TRefColl>(this TRefColl referenceDataCollection, IEnumerable<IReferenceData> additionalItems) where TRefColl : IReferenceDataCollection
{
referenceDataCollection.AddRange(additionalItems);
return referenceDataCollection;
}
}