You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArticleFixture.scala 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. package de.codingchallenge.fixtures
  2. import de.codingchallenge.models.Article
  3. trait ArticleFixture {
  4. val articleUnavailable = Article(
  5. id = "id",
  6. productId = "productId",
  7. name = "name",
  8. description = Some("desc"),
  9. price = 1,
  10. stock = 0)
  11. val cheapestArticle = Article(
  12. id = "cheapest",
  13. productId = "productId",
  14. name = "cheapestArticle",
  15. description = Some("cheapestArticleDesc"),
  16. price = 0,
  17. stock = 1)
  18. val anotherArticle = articleUnavailable.copy(price = 1, stock = 5)
  19. val sampleData: Seq[String] =
  20. """A-U0xzQacF|P-U0xzQacF|EELDPYL||72.17|2
  21. A-CxzQacFC|P-U0xzQacF|LDPYLMEMU YH SZQJVDEAMG|mnlHhk|7.72|6
  22. A-0xzQacFC|P-U0xzQacF|LDPYLMEMU YH SZQJVDEAMG|mnlHhk|7.72|6
  23. A-6TAYX4Ac|P-U0xzQacF|QFBC ELDP||94.22|0
  24. A-tAYX4AcF|P-U0xzQacF|EELDPYL||72.17|2
  25. A-xzQacFC7|P-U0xzQacF|YLM|yuzjdAgfm wwfkgu|92.08|1
  26. A-TAYX4AcF|P-U0xzQacF|EELDPYL||72.17|2
  27. A-XzQacFC7|P-U0xzQacF|YLM|yuzjdAgfm wwfkgu|92.08|1
  28. A-AYX4AcFC|P-U0xzQacF|LDPYLMEMU YH SZQJVDEAMG|mnlHhk|7.72|6
  29. A-zQacFC7P|P-U0xzQacF|M|yuzjdAgfm wwfkgu|92.08|1
  30. A-YX4AcFC7|P-U0xzQacF|YLM|yuzjdAgfm wwfkgu|92.08|1
  31. A-qacFC7Pe|P-U0xzQacF|XYHUSZQJV|mtbswwf gusiukA wllbkxklo|21.62|4
  32. A-X4AcFC7P|P-U0xzQacF|M|yuzjdAgfm wwfkgu|92.08|1
  33. A-QacFC7Pe|P-U0xzQacF|XYHUSZQJV|mtbswwf gusiukA wllbkxklo|21.62|4
  34. A-4AcFC7Pe|P-4AcFC7Pe|XYHUSZQJV|mtbswwf gusiukA wllbkxklo|21.62|4
  35. A-acFC7Pey|P-4AcFC7Pe|SZQJVDEAMG FBMSNWLW FHKKG|siukAyzr bkxklohaa|66.59|3
  36. A-aHqBLPey|P-4AcFC7Pe|SZQJVDEAMG FBMSNWLW FHKKG|siukAyzr bkxklohaa|66.59|3
  37. A-AcFC7Pey|P-4AcFC7Pe|SZQJVDEAMG FBMSNWLW FHKKG|siukAyzr bkxklohaa|66.59|3
  38. A-hqBLPeyU|P-hqBLPeyU|QJVDEAM TFBMSNWLWH HKKGQURSZ|awtwllbkx ebH|16.03|22
  39. A-cFC7PeyU|P-cFC7PeyU|QJVDEAM TFBMSNWLWH HKKGQURSZ|awtwllbkx ebH|16.03|22
  40. A-HqBLPeyU|P-cFC7PeyU|QJVDEAM TFBMSNWLWH HKKGQURSZ|awtwllbkx ebH|16.03|22
  41. A-CFC7PeyU|P-cFC7PeyU|QJVDEAM TFBMSNWLWH HKKGQURSZ|awtwllbkx ebH|16.03|22
  42. A-qBLPeyUj|P-cFC7PeyU|EAMGTF MSNWLW|kgusiukAy llbkxkloha cplqlqxyJw yqscty XcpvAlqswj|15.66|1
  43. A-FC7PeyUj|P-FC7PeyUj|EAMGTF MSNWLW|kgusiukAy llbkxkloha cplqlqxyJw yqscty XcpvAlqswj|15.66|1
  44. A-QBLPeyUj|P-FC7PeyUj|EAMGTF MSNWLW|kgusiukAy llbkxkloha cplqlqxyJw yqscty XcpvAlqswj|15.66|1
  45. A-c7PeyUjD|P-FC7PeyUj|MGT|swwfkg rzDawtwl vvvjebHd aenb aXkcwJyqsc|77.34|17
  46. A-BLPeyUjD|P-FC7PeyUj|MGT|swwfkg rzDawtwl vvvjebHd aenb aXkcwJyqsc|77.34|17
  47. A-C7PeyUjD|P-C7PeyUjD|MGT|swwfkg rzDawtwl vvvjebHd aenb aXkcwJyqsc|77.34|17
  48. A-LPeyUjDg|P-C7PeyUjD|BMSNWL HFH||45.85|0
  49. A-7PeyUjDg|P-C7PeyUjD|BMSNWL HFH||45.85|0
  50. A-peyUjDgF|P-C7PeyUjD|SN L|hkqrz u wtwllbkxkl Hdwcpl|87.72|1
  51. A-DYMxSQVE|P-C7PeyUjD|GTFB|wwfkgu zDawtw|84.12|7
  52. A-PeyUjDgF|P-C7PeyUjD|SN L|hkqrz u wtwllbkxkl Hdwcpl|87.72|1
  53. A-YMxSQVEt|P-YMxSQVEt|MSNWLW FHKKG URSZIDUA|twllb v klohaa plqlqxyJw|8.03|37
  54. A-eyUjDgFM|P-eyUjDgFM|W|fkg rzDawtwl vvvjebHd|19.56|9
  55. A-MxSQVEtB|P-eyUjDgFM|NWLWHF KGQURSZ D||62.12|0
  56. A-2hqVEtBw|P-2hqVEtBw|HFH||45.85|0
  57. A-xSQVEtBw|P-2hqVEtBw|HFH||45.85|0
  58. A-yUjDgFMl|P-yUjDgFMl|FHKKG URSZIDUA|twllb v klohaa plqlqxyJw|8.03|37
  59. A-hqVEtBwW|P-hqVEtBwW|HKKGQURSZ D AKW||2.31|0
  60. A-YUjDgFMl|P-hqVEtBwW|FHKKG URSZIDUA|twllb v klohaa plqlqxyJw|8.03|37
  61. A-SQVEtBwW|P-hqVEtBwW|HKKGQURSZ D AKW||2.31|0
  62. A-UjDgFMlh|P-hqVEtBwW|GQURSZIDU|Ay llbkxkloha|95.28|1
  63. A-qVEtBwWF|P-hqVEtBwW|KGQURSZ D||62.12|0
  64. A-jDgFMlhq|P-hqVEtBwW|SZIDUA WA YWZLRLVBV||29.92|50
  65. A-QVEtBwWF|P-hqVEtBwW|KGQURSZ D||62.12|0
  66. A-dgFMlhqz|P-hqVEtBwW|UAKWATYWZ LVBVKVXJ LBOHHDAWAC|lqlqxyJwv PUpr XcpvAlqswj nlnzjmkv|24.45|2
  67. A-VEtBwWFK|P-hqVEtBwW|URSZIDUA WA YWZLRLVBV||29.92|50
  68. A-DgFMlhqz|P-hqVEtBwW|UAKWATYWZ LVBVKVXJ LBOHHDAWAC|lqlqxyJwv PUpr XcpvAlqswj nlnzjmkv|24.45|2
  69. A-EtBwWFKu|P-hqVEtBwW|ZIDU|Ay llbkxkloha|95.28|1
  70. A-gFMlhqza|P-hqVEtBwW|ATYWZ LVBVKVXJ|bHdwcplqlq kcwJyqsc rdXcpv W|88.45|7
  71. A-tBwWFKuS|P-hqVEtBwW|D||62.12|0
  72. A-fMlhqza2|P-fMlhqza2|WZLRLV VKVXJKEL|haaenbiaX|27.79|0
  73. A-bwWFKuSI|P-bwWFKuSI|AKW YWZLRLVBV||29.92|50
  74. A-FMlhqza2|P-FMlhqza2|WZLRLV VKVXJKEL|haaenbiaX|27.79|0
  75. A-BwWFKuSI|P-FMlhqza2|AKW YWZLRLVBV||29.92|50
  76. A-Mlhqza2Y|P-FMlhqza2|LRLV VKVXJKEL OHHDAW|plqlqxyJw yqscty XcpvAlqswj nlnzjmkv|24.45|2
  77. A-wWFKuSIU|P-wWFKuSIU|WA YWZLRLVBV VXJKELBOHH|aenb|10.51|10
  78. A-lhqza2Yr|P-lhqza2Yr|BVKVXJKELB HHDAWACEP|ql|48.6|10
  79. A-WWFKuSIU|P-lhqza2Yr|WA YWZLRLVBV VXJKELBOHH|aenb|10.51|10
  80. A-HHqza2Yr|P-lhqza2Yr|BVKVXJKELB HHDAWACEP|ql|48.6|10
  81. A-WFKuSIUA|P-lhqza2Yr|WZLRLV VKVXJKEL|haaenbiaX|27.79|0
  82. A-hqza2YrV|P-lhqza2Yr|K X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  83. A-FKuSIUAY|P-lhqza2Yr|LRLV VKVXJKEL OHHDAW|plqlqxyJw yqscty XcpvAlqswj nlnzjmkv|24.45|2
  84. A-Hqza2YrV|P-lhqza2Yr|K X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  85. A-KuSIUAYr|P-lhqza2Yr|BVKVXJKELB HHDAWACEP|ql|48.6|10
  86. A-qza2YrVV|P-lhqza2Yr|X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  87. A-uSIUAYrV|P-uSIUAYrV|K X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  88. A-rDwwLLBK|P-uSIUAYrV|JKELBO HDAWACEPNL|aXkcwJyqsc rdXcpv W|88.45|7
  89. A-sIUAYrVV|P-sIUAYrVV|X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  90. A-za2YrVVj|P-za2YrVVj|LBOHHDAWAC P|ql|48.6|10
  91. A-SIUAYrVV|P-za2YrVVj|X|bHdwcplqlq kcwJyqsc rdXcpv W TqFbn|55.46|0
  92. A-DwwLLBKX|P-za2YrVVj|LBOHHDAWAC P LBQ||27.63|8
  93. A-IUAYrVVj|P-za2YrVVj|LBOHHDAWAC P|ql|48.6|10
  94. A-a2YrVVjb|P-za2YrVVj|HDAWACEPNL QILAQX|cwJy PUpr XcpvAlqswj|15.66|1
  95. A-UAYrVVjb|P-za2YrVVj|HDAWACEPNL QILAQX|cwJy PUpr XcpvAlqswj|15.66|1
  96. A-wwLLBKXK|P-wwLLBKXK|BOHHDAWA EPNLBQILA|kcwJyqsc rdXcpv|97.51|0
  97. A-AYrVVjbd|P-AYrVVjbd|ACEPNLBQIL QXX||96.39|1
  98. A-2YrVVjbd|P-AYrVVjbd|ACEPNLBQIL QXX||96.39|1
  99. A-yrVVjbdc|P-AYrVVjbd|NLBQILAQX KYCJWWJVYS|UprdXcpvA yTqFbn wzijx vo|93.83|0
  100. A-wLLBKXKo|P-wLLBKXKo|DAWA||73.55|31
  101. A-YrVVjbdc|P-wLLBKXKo|NLBQILAQX KYCJWWJVYS|UprdXcpvA yTqFbn wzijx vo|93.83|0
  102. A-lLBKXKoH|P-lLBKXKoH|WACE NLBQILAQX|cwJy PUpr XcpvAlqswj|15.66|1
  103. A-rVVjbdcl|P-rVVjbdcl|LAQXXKYCJW||8.03|37
  104. A-LLBKXKoH|P-rVVjbdcl|WACE NLBQILAQX|cwJy PUpr XcpvAlqswj|15.66|1
  105. A-RVVjbdcl|P-rVVjbdcl|LAQXXKYCJW||8.03|37
  106. A-LBKXKoHA|P-rVVjbdcl|C P|ql|48.6|10
  107. A-VVjbdclQ|P-VVjbdclQ|A|kcwJyqsc rdXcpv|97.51|0
  108. A-BKXKoHAe|P-VVjbdclQ|LBQ LAQXXKYCJW J|PUpr XcpvAlqswj nlnzjmkv|24.45|2
  109. A-VjbdclQq|P-VVjbdclQ|KYCJWWJVYS|UprdXcpvA yTqFbn wzijx vo|93.83|0
  110. A-KXKoHAeN|P-VVjbdclQ|QILAQX KYCJWWJVYS PSUCP|d|31.34|35
  111. A-jbdclQqX|P-VVjbdclQ|CJ|v PUpr XcpvAlqswj nlnzjmkv|24.45|2
  112. A-XKoHAeNB|P-XKoHAeNB|LAQXXKYCJW J YSQPS||22.28|49
  113. A-JbdclQqX|P-XKoHAeNB|CJ|v PUpr XcpvAlqswj nlnzjmkv|24.45|2
  114. A-KoHAeNBa|P-XKoHAeNB|XKYCJWWJ YSQPS C|yydqpgW TqFbn wzijx vo gTro|12.86|2
  115. A-bdclQqXJ|P-XKoHAeNB|J YSQPS||22.28|49
  116. A-oHAeNBak|P-XKoHAeNB|JWWJVYSQPS C TRYDYX|pvAlqsw bnln ijxmdog roqumthtp lijqubnzz|97.32|24
  117. A-BdclQqXJ|P-BdclQqXJ|J YSQPS||22.28|49
  118. A-OHAeNBak|P-BdclQqXJ|JWWJVYSQPS C TRYDYX|pvAlqsw bnln ijxmdog roqumthtp lijqubnzz|97.32|24
  119. A-dclQqXJ7|P-BdclQqXJ|QPSU||77.34|17""".split("\n").map(_.trim)
  120. val sampleGroup = Seq(
  121. "A-C7PeyUjD|P-C7PeyUjD|MGT|swwfkg rzDawtwl vvvjebHd aenb aXkcwJyqsc|77.34|17",
  122. "A-LPeyUjDg|P-C7PeyUjD|BMSNWL HFH||45.85|0",
  123. "A-7PeyUjDg|P-C7PeyUjD|BMSNWL HFH||45.85|0",
  124. "A-peyUjDgF|P-C7PeyUjD|SN L|hkqrz u wtwllbkxkl Hdwcpl|87.72|1",
  125. "A-DYMxSQVE|P-C7PeyUjD|GTFB|wwfkgu zDawtw|84.12|7",
  126. "A-PeyUjDgF|P-C7PeyUjD|SN L|hkqrz u wtwllbkxkl Hdwcpl|87.72|1"
  127. )
  128. }