Closed BohdanOrlov closed 7 years ago
Hi Bohdan. Thanks for raising this issue. I can't see a problem with what you've suggested. I might suggest the following naming with get/set though:
var invokedPhotoItemsGetter = false
var invokedPhotoItemsGetterCount = 0
...
var invokedPhotoItemsSetter = false
var invokedPhotoItemsSetterCount = 0
I'll look into the implementation of this.
@BohdanOrlov This is now fixed. Property getter and setters are now treated like methods. So you can check their invocations like this:
var invokedPhotoItemsGetter = false
var invokedPhotoItemsGetterCount = 0
var stubbedPhotoItems: [Photo]!
...
var invokedPhotoItemsSetter = false
var invokedPhotoItemsSetterCount = 0
var invokedPhotoItems: [Photo]?
var invokedPhotoItemsList = [[Photo]]()
It will take a day or 2 for JetBrains to process the new update. If you want it in the meantime you can find the JAR in the releases page.
Thank you very much @seanhenry! Will try it out!
Hello, Sean! Thank you for the generator. You did an amazing job!
Would it be hard for you to add some missing functionality for mock code generated for properties?
Consider this code and generated mock.
It would be great that
photoItems
property also hadinvokedGet<ProperyName>
andinvokedGet<ProperyName>Count
.Otherwise, it is not possible to check if the property was invoked.
Accordingly, for { get set } properties it would be amazing to have the same thing for Setter:
invokedSet<ProperyName>
andinvokedSet<ProperyName>Count
andinvokedSet<ProperyName>Parameter