public static async Task CreateLinksFor <TModel>(this ILinksCreator <TModel> linksCreator, IEnumerable <TModel> models) { if (models == null) { throw new ArgumentNullException(nameof(models)); } await models.ForEach(async model => await linksCreator.CreateLinksFor(model)); }
public CreateLinksFor() { _linksCreator = A.Fake <ILinksCreator <ApiHomeResponse> >(); _appInfos = new[] { new ApiHomeResponse { ApplicationInfo = new ApplicationInfo { Product = Guid.NewGuid().ToString() } }, new ApiHomeResponse { ApplicationInfo = new ApplicationInfo { Product = Guid.NewGuid().ToString() } }, new ApiHomeResponse { ApplicationInfo = new ApplicationInfo { Product = Guid.NewGuid().ToString() } } }; }