Created
October 29, 2021 12:33
-
-
Save oliverspryn/431ae6620dbe366bf6baf67ab03270e3 to your computer and use it in GitHub Desktop.
A faulty unit test, where only one side-effect is tested, giving me credit for full function coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DetailsViewMvcImplTest : Spek({ | |
| describe("The DetailsViewMvcImpl") { | |
| var mockButton: MaterialButton? = null | |
| var mockPhoto: AppCompatImageView? = null | |
| var mockRootView: View? = null | |
| var mockTitle: AppCompatTextView? = null | |
| var uut: DetailsViewMvcImpl? = null | |
| beforeEachTest { | |
| // Setup the mocks and UUT here | |
| } | |
| describe("when init") { | |
| it("inflates the layout and sets it as the root view") { | |
| expect(uut?.rootView).to.equal(mockRootView) | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment