marcinmoskala

    marcinmoskala

    4 years ago
    Learn about basics of unit testing in Kotlin with the great article written by @oleksiyp. Enjoy😃https://blog.kotlin-academy.com/mocking-is-not-rocket-science-basics-ae55d0aadf2b
    d

    dariuszbacinski

    4 years ago
    Naming things in this article is a bit incorrect and might lead to confusion. To be precise Stubs are called Mocks.
    this articles serves as a good reference how to name test doubles
    o

    oleksiyp

    4 years ago
    Yeah Ive read this Martin Fowler post before.
    Let me check
    d

    dariuszbacinski

    4 years ago
    to me this whole article is about stubbing but not mocking
    o

    oleksiyp

    4 years ago
    So how to fix it? Remove mocking out of it?
    😃
    We should have sent it to you first
    d

    dariuszbacinski

    4 years ago
    Replace mocking with stubbing
    You will probably describe mocking in the next article
    Mocking = verifying interactions with a dependency
    Stubbing = having control over responses from the dependency
    Second article that I have pasted describes it very well in detalis
    o

    oleksiyp

    4 years ago
    Yes Ive read this second as well before publishing. Although you right about conceptual things, I dont see possiblity to overcome this easily now
    May be one thing I am able to do I can add verify constructs to source snippet and explain it
    If you are interested like why I did not put one more term after reading this defintions I think just to simplify things.
    Anyway only in the evening Ill be able to get to computer and do changes
    And probably Ill be drunk 😃
    So tomorrow
    marcinmoskala

    marcinmoskala

    4 years ago
    In the article "Mocking" wasn't defined or even used anywhere expect in the introduction. But we want to make things as clear as possible so for now I (as an editor of Kotlin Academy) will add few words of clarification in the beginning.
    And thank you @dariuszbacinski for your comment 🙂