gh-gei icon indicating copy to clipboard operation
gh-gei copied to clipboard

Improve test assertions on `MigrateRepoCommandTests`

Open juanmrad opened this issue 3 years ago • 3 comments

based on: https://github.com/github/gh-gei/pull/236#discussion_r804268113

We want to improve the way the testing is structure for GetMigrationState in a way we can check that it gets called multiple times before it is successful.

With Moq you can orchestrate the methods calls in such a way that with each call they return a different result as seen here That way we can test the flow for wait for status.

Todo

  • [ ] chain returns to check that method is called multiple times before happy path.

juanmrad avatar Feb 14 '22 15:02 juanmrad

can this be closed @juanmrad ?

dylan-smith avatar Mar 17 '22 18:03 dylan-smith

@dylan-smith up you you. this was a recommendation from @ArinGhazarian when doing the repo command merge.

juanmrad avatar Mar 17 '22 20:03 juanmrad

oh ok, was just curious if the work was done in the linked PR or not? sounds like maybe not, so I'll leave it open if there's still work to be done here.

dylan-smith avatar Mar 17 '22 20:03 dylan-smith