A refusal to allow the preference provided for in this chapter, or a reduction of the salary for the position with intent to bring about the resignation or discharge of the incumbent, entitles the applicant or incumbent to maintain an action of mandamus to right the wrong.
SDCL 3-3-3