fixed bugs
getNames and getByOrdinal did not work for enums constructed from objects.
Added unit tests