Fix enum in files .cxx and .h and fixed tests