Numerical modeling and X-ray spectroscopy of ECR-plasmas