public void GetList() { DynamicsQuery query = new DynamicsQuery { Table = DynamicsTables.Organization }; Task <DynamicsResponse <ICollection <Organization> > > task = HttpFunctions.GetAsync <DynamicsResponse <ICollection <Organization> > >(connector.GetClient(), query.GetPath()); DynamicsResponse <ICollection <Organization> > answer = task.GetAwaiter().GetResult(); Assert.IsTrue(answer != null); Assert.IsTrue(answer.value.Count > 0); }
public void CrudAccount() { DynamicsQuery query = new DynamicsQuery { Table = DynamicsTables.Account }; JObject account = JObject.FromObject(new Account() { name = "CrudTest �הצ" }, new JsonSerializer { NullValueHandling = NullValueHandling.Ignore }); account["*****@*****.**"] = "/systemusers(" + SystemUserId + ")"; Task <string> task = HttpFunctions.CreateAsync(connector.GetClient(), query.GetPath(), JsonConvert.SerializeObject(account)); string answer = task.GetAwaiter().GetResult(); Assert.IsTrue(answer != null); query.Key = answer; Task <bool> task2 = HttpFunctions.DeleteAsync <bool>(connector.GetClient(), query.GetPath()); bool boolAnswer = task2.GetAwaiter().GetResult(); Assert.IsTrue(boolAnswer); }