File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
src/test/java/getRequests Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ package getRequests ;
2+
3+ import Client .SpotifyClient ;
4+ import Client .SpotifyLogin ;
5+ import org .junit .jupiter .api .Test ;
6+
7+ import java .io .IOException ;
8+
9+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
10+
11+ public class MarketTest {
12+
13+ static SpotifyClient client ;
14+
15+ static {
16+ try {
17+ client = new SpotifyClient ("d56c8c3f79a1459bba2c286cfa7aa15b" , "9dcd475a773d467990dd75eede0af55f" );
18+
19+ SpotifyLogin login = client .getLogin ();
20+ login .setEmailOrUsername ("exampleEmail" );
21+ login .setPassword ("examplePasword" );
22+ login .setRedirectUri ("exampleRedirectURI" );
23+ login .addScope ("user-library-modify" );
24+ client .requestAuthCodeFlowCode (client );
25+ client .generateAccessTokenAndRefreshToken (client );
26+
27+
28+ } catch (IOException | InterruptedException e ) {
29+ e .printStackTrace ();
30+ }
31+ }
32+
33+ @ Test
34+ void testGetAvailableMarkets () throws IOException {
35+
36+ assertNotNull (client .getAvailableMarkets (client ));
37+
38+ }
39+
40+ }
You can’t perform that action at this time.
0 commit comments