Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Last active September 9, 2024 18:25
Show Gist options
  • Save trikitrok/5b235041aa1f42f0ed8c0f86baa34c68 to your computer and use it in GitHub Desktop.
Save trikitrok/5b235041aa1f42f0ed8c0f86baa34c68 to your computer and use it in GitHub Desktop.
Argent Rose Requirements Specification lite version

Argent Rose Requirements Specification

Context.

My name is Syl. I'm the owner of the Argent Rose, a small wizardry store.

I need to update the inventory of my store, at the end of each day, in order to track the quality and sell-in of my products.

  • All products have:

    1. A description.
    2. A sell-in value which denotes the number of days we have to sell the product (0 means the last day the product should be sold).
    3. A quality value which denotes how valuable the product is. It's never negative and never more than 50.
  • All the products in our inventory are valid.

Rules for updating products before its sell-in days expires.

Regular products:

  • quality decreases by two.
  • sell-in decreases by one.

Special products

  1. Products described as "Aged Brie":

    • Their sell-in decreases by one.
    • Their quality increases by one.
  2. Products described as "Lanzarote Wine":

    • Their sell-in decreases by one.
    • Their quality increases by two.
  3. Products described as "Theatre Passes":

    • Their sell-in decreases by one.
    • Their quality changes as their sell-in day approaches:
      • increases by one when there are more than five days to sell the product.
      • increases by three when there are five days or less to sell the product.
      • drops to zero after the play.

Rules for updating products after its sell-in days expires.

  • Their quality changes twice as fast as it did before the sell-in days expires.
  • Their sell-in decreases by one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment