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

Behaviour: LookupCommitHistoryService/lookup commit history #48

Open
magwas opened this issue Jun 4, 2020 · 1 comment
Open

Behaviour: LookupCommitHistoryService/lookup commit history #48

magwas opened this issue Jun 4, 2020 · 1 comment
Assignees
Milestone

Comments

@magwas
Copy link
Contributor

magwas commented Jun 4, 2020

Behaviour: LookupCommitHistoryService/lookup commit history
Milestone: api basics

Behaviour description:

  • add commit to history
  • if the commit do not follow another commit, the return the history, else
  • lookup commit history for the commit followed (in tail recursion)

This is the main behaviour for the service, so

  • Make sure that the service interface matches the model
  • If the service have return value, make sure that it is according to the specification
  • Add any extras mentioned above

Annotations for the test cases:

@TestedBehaviour("lookup commit history")
@TestedService("LookupCommitHistoryService")

The production code is at com.kodekonveyor.repo.backend.api.lookup.LookupCommitHistoryService.java
The testbase is at com.kodekonveyor.repo.backend.api.lookup.LookupCommitHistoryServiceTestBase.java
The testcase is at com.kodekonveyor.repo.backend.api.lookup.LookupCommitHistoryServiceLookupCommitHistoryTest.java

The service:

DumpRepositoryController
DumpRepositoryController

How to work:

  • identify what of the above is relevant to your service
  • come up with a test about the relevant part
    • create a new empty test
    • make sure that the test description is understandable for the end user
    • put it to @DisplayName annotation for the test
    • write the test according to the test description
    • see the test fail in the right way
    • write the production code needed to pass the test, and no more
    • see the test pass
    • get rid of any PMD violations, comments and other problems in the code
    • see that all tests pass
  • repeat until you covered all the relevant parts of the behaviour
  • submit your pull request against the milestone of the task

If you have questions, see the FAQ, or ask on our discord channel or ask your mentor.

@magwas magwas added this to the api basics milestone Jun 4, 2020
@gplkrnkr
Copy link

grab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants