Code review comment for lp:~azzar1/unity/devices-cleanup-and-test

Revision history for this message
Andrea Azzarone (azzar1) wrote :

> Is VolumeImp providing a C++ wrapper around GVolumeIface ?

Volume is the interface, VolumeImp is the implementation. Volume doesn't know nothing about GVolume, VolumeImp is a kind of a wrapper. I added unit-test for VolumeImp because it's not a simple wrapper.

> I feel like its a bit strange then, if the contents of the underlying GVolume can never be altered except by VolumeImp, that they are being altered in the tests to check the behaviour of VolumeImp.

> Wouldn't it be better to alter GVolume through VolumeImp ?

We do it in VolumeLauncherIcon, mocking Volume. VolumeLauncherIcon doesn't use VolumeImp...

> Unless it is that it wraps an /existing/ GVolume, which has can_eject () already set. In this case, it probably makes more ense to implement GMockVolume in terms of google mock.

I will study this opportunity. Thank you :)

« Back to merge proposal