Consider this definition
public interface DiscoveredCharacteristic : Characteristic {
public val descriptors: List<DiscoveredDescriptor>
public val properties: Properties
}
Properties is a public value class with an internal constructor
- All values of properties are marked
internal(Broadcast, WriteWithoutResponse etc).
The result of this is that there is no way for me to create a fake for testing.
object FakeDiscoveredCharacteristic: DiscoveredCharacteristic {
override val properties: Characteristic.Properties
get() = Properties(4) // Cannot use this or WriteWithoutResponse
}
Would you consider offering some way to create an instance of Properties to unlock fakes? Or alternatively, do you have any suggestions for how to write unit tests for code that uses DiscoveredCharacteristic?
Consider this definition
Propertiesis apublic value classwith aninternal constructorinternal(Broadcast,WriteWithoutResponseetc).The result of this is that there is no way for me to create a fake for testing.
Would you consider offering some way to create an instance of Properties to unlock fakes? Or alternatively, do you have any suggestions for how to write unit tests for code that uses
DiscoveredCharacteristic?