public void MeAccountsGetTest() { var client = new GraphApi.Client(accessToken); GraphApi.Account account = client.Me.Accounts(10, GraphApi.User.Fields.ID); Assert.IsNotNull(account); Assert.IsNotNull(account.Data); }
public void MeGetTest() { var client = new GraphApi.Client(accessToken); GraphApi.User user = client.Me.Get(); Assert.IsNotNull(user); Assert.IsNotNull(user.ID); Assert.IsNotNull(user.Name); }
public void GetUserWithFilterTest() { var client = new GraphApi.Client(accessToken); GraphApi.User user = client.Get<GraphApi.User>(userID, GraphApi.User.Fields.ID); Assert.IsNotNull(user); Assert.IsNotNull(user.ID); Assert.IsNull(user.Name); }
public void EventsPostTest() { var client = new GraphApi.Client(accessToken); string dateTime = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd THH:mm:ss-"); string offset = DateTimeOffset.Now.ToString("HHmm"); GraphApi.Event result = client.CreateEvent("test event", dateTime + offset); Assert.IsNotNull(result); bool isIDEmpty = String.IsNullOrEmpty(result.ID); Assert.IsFalse(isIDEmpty); }