Skip to content

Instantly share code, notes, and snippets.

@julien-topcu
Last active October 18, 2021 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julien-topcu/a41b0f53ef753db37f7d5f7b8be66339 to your computer and use it in GitHub Desktop.
Save julien-topcu/a41b0f53ef753db37f7d5f7b8be66339 to your computer and use it in GitHub Desktop.
Feature: Search tracks for a specific music style
Rule: the returned tracks must correspond to the music style
Example: A listener requests an unknown music style
Given a listener
And the music library is composed of classical, rock tracks
When the listener requests tracks for the funk music style
Then the listener is notified that there are no tracks available for the funk style
Example: A listener requests a music style belonging to the music library
Given a listener
And the music library is composed of classical, funk, rock tracks
When the listener requests tracks for the funk music style
Then the listener gets the funk tracks
Rule: Previews are only available to premium listeners
Example: A listener requests a music style having only previews
Given a listener
And the music library has only previews for the funk style
When the listener requests tracks for the funk music style
Then the listener is notified that there are no tracks available for the funk style
But the listener is notified that previews exist for the funk style
And the listener is invited to subscribe to the premium program
Example: A listener requests a music style having previews
Given a listener
And the music library has previews for the funk style
When the listener requests tracks for the funk music style
Then the listener gets the funk tracks
But there is no previews amongst the tracks
Example: A premium listener requests a music style belonging to the music library
Given a premium listener
And the music library has previews for the funk style
When the premium listener requests tracks for the funk music style
Then the premium listener has access to funk previews
Rule: the returned tracks also correspond to the related style of the requested one
Example: A listener requests a music style having a related music style
Given a listener
And the music library is composed of classical, disco, funk tracks
And disco is related to the funk style
When the listener requests tracks for the funk music style
Then the listener gets the funk tracks
And the listener also gets the disco tracks
And the listener gets nothing else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment