awesominat / stonks

The ideal investment platform
1 stars 0 forks source link

New Buy/Sell tests, Refactor Useless Files, Remove Useless Methods, 28% coverage (1/4) #196

Closed awesominat closed 9 months ago

awesominat commented 9 months ago

fixes #188 This pr:

  1. introduces 10 new tests to buy and sell, covering almost every possible scenario, such as: a. buying stock and verifying stock was bought in the portfolio and history b. getting balance for both buy and sell c. selling stock and verifying change was reflected in portfolio and history d. getting buy news e. edge cases like negative numbers, tickers that dont exist, and buying/selling with not enough money/assets f. getting buy news with invalid ticker g. verifying all output datas of buy and sell are as expected after each action

also, we have now switched to JUnit 5 for its BeforeEach decorator.