Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from Dec 2, 2023

Conversation

awesominat
Copy link
Owner

@awesominat awesominat commented Dec 1, 2023

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.

@awesominat awesominat changed the title New Buy/Sell tests, Refactor Useless Files, Remove Useless Methods, 28% coverage New Buy/Sell tests, Refactor Useless Files, Remove Useless Methods, 28% coverage (1/4) Dec 2, 2023
Copy link
Collaborator

@quiz3 quiz3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JUnit5 will make testing easier no doubt.

@@ -51,10 +45,36 @@
<version>2.10.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. This is what I wanted us to do earlier. JUnit5 on top!

@quiz3 quiz3 merged commit d32027b into main Dec 2, 2023
2 checks passed
@quiz3 quiz3 deleted the separate-buy-sel-make-comprehensive branch December 2, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separate testing for buy and sell and make them more comprehensive
2 participants