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));
 }
Esempio n. 2
0
 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()
             }
         }
     };
 }