public void GetTemplatesAsync() { var request = new PrintTemplatesListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret); var printTemplates = PrintTemplatesService.GetTemplatesAsync(request).GetAwaiter().GetResult(); Assert.IsTrue(printTemplates.Data.ToList().Count > 0); }
public void GetFilteredTemplates() { var request = new PrintTemplatesListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret) { Filter = PrintTemplatesFilter.Order }; var printTemplates = PrintTemplatesService.GetTemplatesAsync(request).GetAwaiter().GetResult(); Assert.IsNotNull(printTemplates.Data.ToList()); Assert.IsTrue(printTemplates.Data.Count() > 0); foreach (var order in printTemplates.Data) { Assert.IsTrue(order.Name == "Följesedel" || order.Name == "Orderbekräftelse" || order.Name == "Orderbekräftelse - Beställt antal" || order.Name == "Plocklista - Reserverat antal"); } }