예제 #1
0
        public void TestDurumSorgula()
        {
            IUyumsoftService mockUyumsoftService = new MockUyumsoftService();

            GIBInterface.IEFatura provider = new EFatura(mockUyumsoftService);
            GIBFramework.EFatura  eFatura  = new GIBFramework.EFatura(provider);


            List <GIBInterface.QueryStatusParameters> val = new List <GIBInterface.QueryStatusParameters>();



            {
                GIBInterface.QueryStatusParameters item = new GIBInterface.QueryStatusParameters();
                item.RecordId    = 0;
                item.InvoiceUUID = Guid.NewGuid();
                val.Add(item);
            }

            {
                GIBInterface.QueryStatusParameters item = new GIBInterface.QueryStatusParameters();
                item.RecordId    = 0;
                item.InvoiceUUID = Guid.NewGuid();
                val.Add(item);
            }

            var res = eFatura.FaturaDurumSorgula(val);


            Assert.AreEqual(res.Count, 2, "2 fatura dönmeli");
            Assert.AreEqual(res[0].InvoiceStatus, GIBInterface.QueryStatus.BasariliSonuclandi);
            Assert.AreEqual(res[1].InvoiceStatus, GIBInterface.QueryStatus.BasariliSonuclandi);
        }
예제 #2
0
        public void TestMukellefBilgisi()
        {
            IUyumsoftService mockUyumsoftService = new MockUyumsoftService();

            GIBInterface.IEFatura provider = new EFatura(mockUyumsoftService);
            GIBInterface.IGIBData data     = null;
            GIBFramework.EFatura  eFatura  = new GIBFramework.EFatura(provider);
            var user = eFatura.MukellefBilgisi("6130438766");

            Assert.IsNotNull(user, "Mükellef Bulunamadı");
            user = eFatura.MukellefBilgisi("1111111111");
            Assert.IsNull(user, "Mükellef olmaması gerekirdi");
        }
예제 #3
0
        public void TestSendInvoice()
        {
            IUyumsoftService mockUyumsoftService = new MockUyumsoftService();

            GIBInterface.IEFatura provider = new EFatura(mockUyumsoftService);
            GIBFramework.EFatura  eFatura  = new GIBFramework.EFatura(provider);

            GIBInterface.SendParameters val = new GIBInterface.SendParameters();
            val.InvoicesInfo = CreateInvoiceInfoList();

            GIBInterface.SendResult response = eFatura.SendInvoice(val);

            Assert.AreEqual(response.IsSucceded, true, "Fatura başarısız oldu");
            Assert.AreEqual(response.ResultInvoices.Count, 2, "Fatura sayısı 2 olmalı");
        }