I am trying to mock the one of static method readAttributes
using groovy's metaClass
convention, but the real method get invoked.
This is how I mocked the static function:
Files.metaClass.static.readAttributes(file.toPath(), BasicFileAttributes.class) >> null
Am I doing something wrong here?
Aucun commentaire:
Enregistrer un commentaire