small refactoring of parser tests ( added base class )

cosmetic refactoring for parser tests