-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUsersProfileTest.java
More file actions
47 lines (31 loc) · 1.14 KB
/
Copy pathUsersProfileTest.java
File metadata and controls
47 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package getRequests;
import Client.SpotifyClient;
import Client.SpotifyLogin;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class UsersProfileTest {
static SpotifyClient client;
static {
try {
client = new SpotifyClient("d56c8c3f79a1459bba2c286cfa7aa15b", "9dcd475a773d467990dd75eede0af55f");
SpotifyLogin login = client.getLogin();
login.setEmailOrUsername("exampleEmail");
login.setPassword("examplePasword");
login.setRedirectUri("exampleRedirectURI");
login.addScope("user-modify-playback-state");
client.requestAuthCodeFlowCode(client);
client.generateAccessTokenAndRefreshToken(client);
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
@Test
void testGetCurrUserProfile() throws IOException{
assertNotNull(client.getCurrUserProfile(client));
}
@Test
void testGetUserProfile() throws IOException{
assertNotNull(client.getUserProfile(client));
}
}