Esempio n. 1
0
 public async void Login_Failed()
 {
     //Arrange
     XMLRpcOdooClient caller = new XMLRpcOdooClient("https://corexmlrpcdemo.odoo.com", "*****@*****.**", "odoo2018", "corexmlrpcdemo");
     //Act && Assert
     await Assert.ThrowsAsync <XMLRpcInvalidCredentiasException>(() => caller.Login());
 }
Esempio n. 2
0
        public async void Can_Call_Login()
        {
            //Arrange
            XMLRpcOdooClient caller = new XMLRpcOdooClient("https://corexmlrpcdemo.odoo.com", "*****@*****.**", "odoo2019", "corexmlrpcdemo");
            //Act
            var returned = await caller.Login();

            //Assert
            Assert.IsType <int>(returned);
        }
Esempio n. 3
0
        public async void Can_Call_SearchRead()
        {
            //Arrange
            var filters             = new XMLRpcParamList <IXMLRpcParameter>();
            XMLRpcOdooClient caller = new XMLRpcOdooClient("https://corexmlrpcdemo.odoo.com", "*****@*****.**", "odoo2019", "corexmlrpcdemo");
            //Act
            var returned = await caller.SearchAndRead <List <Contacto> >("res.partner", filters);

            Assert.IsType <List <Contacto> >(returned);
            //Assert
            Assert.True(returned.Count > 0);
        }