Esempio n. 1
0
        public void Invoices()
        {
            var controller = new PdfController(apiClient);
            var result     = controller.Invoices("order", "xxx");

            Assert.IsNull(result.Result);

            var pdfKey = Portal.Properties.Settings.Default.pdfKey;

            result = controller.Invoices("order", pdfKey);
            Assert.IsTrue(apiClient.Parameters.ContainsKey("order_nos"));
            Assert.IsInstanceOfType(result.Result, typeof(ViewResult));
            Assert.IsInstanceOfType((result.Result as ViewResult).Model, typeof(List <Order>));
        }