sa-mw-dach / opendj

Apply Open Source principles to the Dance Floor! MOVED TO https://github.com/opendj/opendj
https://github.com/opendj/opendj
GNU General Public License v3.0
6 stars 9 forks source link

Mock Spotify Backend #10

Closed DanielFroehlich closed 5 years ago

DanielFroehlich commented 5 years ago

For easy testing / showcases, until we fixed the Outh Flow issue, the spotify backend should have a mock, responding with some track data.

DanielFroehlich commented 5 years ago

I think a simple env setting "ENABLE_MOCK=true/false" would be helpfull.

wrichter commented 5 years ago

Suggest to mock the backend (eg create a mock boundary) but not spotify itself http://test-driven-development.com/2011/08/do-not-mock-third-party-classes/

DanielFroehlich commented 5 years ago

Done! Simple Mockup with static data is now working. Available Track Data: var mockedTrackInfo = { "6JEK0CvvjDjjMUBFoXShNZ": { "trackName": "Never Gonna Give You Up", "albumName": "The Best Of", "artistName": "Rick Astley", "image": "https://i.scdn.co/image/a97f4035a3d494c68185a85e949a0b2fd75a1855", "duration_ms": 354320 }, "4u7EnebtmKWzUH433cf5Qv": { "trackName": "Bohemian Rhapsody - Remastered 2011", "albumName": "A Night At The Opera (2011 Remaster)", "artistName": "Queen", "image": "https://i.scdn.co/image/16f066184e92b296f9a202a326633a934607cb88", "duration_ms": 354320 }, "6h9AH81lpDbjcsBz2ClqAE": { "trackName": "The Time Is Now", "albumName": "Things to Make and Do", "artistName": "Moloko", "image": "https://i.scdn.co/image/cb832c02a2349ed0e44d06f433b7fbc4e6fce3d0", "duration_ms": 318280 }, "2GUESfQxaSuauM5fwiRkXb": { "trackName": "Ladies Night - Single Version", "albumName": "Celebration: The Best Of Kool & The Gang (1979-1987)", "artistName": "Kool & The Gang", "image": "https://i.scdn.co/image/1a79fc451775aa94985eada31f757957bb7c0d98", "duration_ms": 209706 },