Beispiel #1
0
        public void FirstItemsFoundTest()
        {
            var service = new OdooService(Connection);

            var partner = service.First(OdooFilter <OdooPartner> .Where(x => x.Id == 3354));

            Assert.IsNotNull(partner);
            Assert.That(partner.Id == 3354);
        }
        public void FirstItemsFoundTest()
        {
            var service = new OdooService(Connection);

            var partner = service.First(OdooFilter<OdooPartner>.Where(x => x.Id == 3354));

            Assert.IsNotNull(partner);
            Assert.That(partner.Id == 3354);
        }
        public void UpdateTest()
        {
            var service = new OdooService(Connection);

            var partner = new OdooPartner { Email = "*****@*****.**", IsCompany = true, Name = "Test Company" };

            var id = service.AddOrUpdate(partner);

            Assert.That(id > 0);

            var check = service.First(OdooFilter<OdooPartner>.Where(x => x.Id == id));

            Assert.That(check.Name == "Test Company");
            partner.Name = "NEW NAME";


            service.AddOrUpdate(partner);

            var check2 = service.First(OdooFilter<OdooPartner>.Where(x => x.Id == id));

            Assert.That(check2.Name == "NEW NAME");
        }
Beispiel #4
0
        public void UpdateTest()
        {
            var service = new OdooService(Connection);

            var partner = new OdooPartner {
                Email = "*****@*****.**", IsCompany = true, Name = "Test Company"
            };

            var id = service.AddOrUpdate(partner);

            Assert.That(id > 0);

            var check = service.First(OdooFilter <OdooPartner> .Where(x => x.Id == id));

            Assert.That(check.Name == "Test Company");
            partner.Name = "NEW NAME";


            service.AddOrUpdate(partner);

            var check2 = service.First(OdooFilter <OdooPartner> .Where(x => x.Id == id));

            Assert.That(check2.Name == "NEW NAME");
        }
Beispiel #5
0
        public void FirstItemsNotFoundTest()
        {
            var service = new OdooService(Connection);

            Assert.Throws <ArgumentNullException>(() => service.First(OdooFilter <OdooPartner> .Where(x => x.Id == 0)));
        }
        public void FirstItemsNotFoundTest()
        {
            var service = new OdooService(Connection);

            Assert.Throws<ArgumentNullException>(() => service.First(OdooFilter<OdooPartner>.Where(x => x.Id == 0)));
        }