public void Test_Find_Filter() { IPrintTemplateConnector connector = new PrintTemplateConnector(); var searchSettings = new PrintTemplateSearch(); searchSettings.FilterBy = Filter.PrintTemplate.Order; var orderTemplates = connector.Find(searchSettings); Assert.AreEqual(3, orderTemplates.Entities.Count); searchSettings.FilterBy = Filter.PrintTemplate.Offer; var offerTemplates = connector.Find(searchSettings); Assert.AreEqual(1, offerTemplates.Entities.Count); searchSettings.FilterBy = Filter.PrintTemplate.Invoice; var invoiceTemplates = connector.Find(searchSettings); Assert.AreEqual(9, invoiceTemplates.Entities.Count); }
public async Task Test_Find_Filter() { var connector = FortnoxClient.PrintTemplateConnector; var searchSettings = new PrintTemplateSearch(); searchSettings.FilterBy = Filter.PrintTemplate.Order; var orderTemplates = await connector.FindAsync(searchSettings); Assert.AreEqual(3, orderTemplates.Entities.Count); searchSettings.FilterBy = Filter.PrintTemplate.Offer; var offerTemplates = await connector.FindAsync(searchSettings); Assert.AreEqual(1, offerTemplates.Entities.Count); searchSettings.FilterBy = Filter.PrintTemplate.Invoice; var invoiceTemplates = await connector.FindAsync(searchSettings); Assert.AreEqual(9, invoiceTemplates.Entities.Count); }