public async void Login_Failed() { //Arrange XMLRpcOdooClient caller = new XMLRpcOdooClient("https://corexmlrpcdemo.odoo.com", "*****@*****.**", "odoo2018", "corexmlrpcdemo"); //Act && Assert await Assert.ThrowsAsync <XMLRpcInvalidCredentiasException>(() => caller.Login()); }
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); }
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); }