miércoles, 13 de junio de 2018

Week 4: 4th June - 10th June

This week I transformed the File listener into a factory and template so it can accommodate for the various file formats that broadcasting apps can use. I also modified the metadata broadcaster to only broadcast tracks that have spent 5 minutes or more unloaded, to avoid unnecessary repetitive scrobblings. I refactored the scrobbling manager class to both make it more readable (still working on this) and to allow for dependency injection. The latter is necessary to write automatic tests, to be able to introduce timer mocks. I also changed the isTrackAudible function to a strategy pattern to be able to change it at runtime. I don't know if this will be necessary but since I had to include dependency injection anyway why not make it an interface. I also wrote google tests for the scrobbling manager. I might write more tests if deemed necessary.

No hay comentarios:

Publicar un comentario