God considered that both of them were righteous, because they constantly completely obeyed everything that God had commanded.