public void TestGetUserAsyncWithOAuth() { Completion = new ManualResetEvent(false); SoundCloudApiAuthenticated.User().GetAsync(UserBuilder); Completion.WaitOne(TimeSpan.FromSeconds(100)); Assert.IsNotEmpty(_asyncUserResult.Username); }
public void TestCreateUserWebProfileRequest() { var webProfileWithId = SoundCloudApiAuthenticated.User(509497).WebProfile().Post(_webProfile); var newWebProfile = SoundCloudApiAuthenticated.User(509497).WebProfile(webProfileWithId.Id).Get(); Assert.AreEqual(webProfileWithId.Id, newWebProfile.Id); SoundCloudApiAuthenticated.User().WebProfile(webProfileWithId.Id).Delete(); }
public void TestPutUserWebProfileRequest() { var webProfileWithId = SoundCloudApiAuthenticated.User(509497).WebProfile().Post(_webProfile); webProfileWithId.Title = "Owl 2"; SoundCloudApiAuthenticated.User().WebProfile(webProfileWithId.Id).Put(webProfileWithId); var scVersion = SoundCloudApiAuthenticated.User().WebProfile(webProfileWithId.Id).Get(); Assert.AreEqual(webProfileWithId.Title, scVersion.Title); SoundCloudApiAuthenticated.User().WebProfile(webProfileWithId.Id).Delete(); }
public void TestGetUserMultipleRequestsWithOAuth() { var resourceList = new List <IUser> { SoundCloudApiAuthenticated.User(), SoundCloudApiAuthenticated.User(), SoundCloudApiAuthenticated.User(), }; var users = SoundCloudApiAuthenticated.Execute(resourceList); Assert.AreEqual(3, users.Count); }
public void TestGetUserAsyncMultipleRequestsWithOAuth() { Completion = new ManualResetEvent(false); var resourceList = new List <IUser> { SoundCloudApiAuthenticated.User(), SoundCloudApiAuthenticated.User(), SoundCloudApiAuthenticated.User(), }; SoundCloudApiAuthenticated.ExecuteAsync(resourceList, UserListBuilder); Assert.AreEqual(3, _asyncUsersResult.Count); }
public void TestGetUserWithOAuthRequestForceRefresh() { SoundCloudApiAuthenticated.User().Get(); var token = PasswordCredentialsState.Load(); token.ExpiresIn = 1; // Override the usual hour long session soundcloud sends back while (!token.HasExpired()) { Thread.Sleep(100); } PasswordCredentialsState.Save(token); SoundCloudApiAuthenticated = SoundCloudApi.CreateClient(TestSettings.ClientId, TestSettings.ClientSecret, PasswordCredentialsState); var user = SoundCloudApiAuthenticated.User().Get(); Assert.IsNotEmpty(user.Username); }
public void TestGetUserWithOAuthRequest() { var user = SoundCloudApiAuthenticated.User().Get(); Assert.AreEqual(509497, user.Id); }
public void TestDeleteUserWebProfileRequest() { var webProfileWithId = SoundCloudApiAuthenticated.User(509497).WebProfile().Post(_webProfile); SoundCloudApiAuthenticated.User().WebProfile(webProfileWithId.Id).Delete(); }
public void TestGetUserWebProfileRequest() { var webprofile = SoundCloudApiAuthenticated.User().WebProfiles().Get(); Assert.IsNotNull(webprofile); }
public void TestPutUserFollowingRequest() { var user = SoundCloudApiAuthenticated.User().Following(17567595).Put(); Assert.IsNotNull(user.Username); }
public void UserFollowingResourceTestsTearDown() { SoundCloudApiAuthenticated.User().Following(17567595).Delete(); }
public void TestDeleteUserFollowingRequest() { SoundCloudApiAuthenticated.User().Following(17567595).Delete(); }
public void TestPutUserFavoriteRequest() { SoundCloudApiAuthenticated.User().Favorite(1379060).Put(); }
public void UserFavoriteResourceTestsTearDown() { SoundCloudApiAuthenticated.User().Favorite(1379060).Delete(); }