The contest shall be brought in the superior court of any affected county and shall be conducted in the manner provided for contests of election by the Elections Code. In a contest not involving the right of a person declared elected to an office to hold the office, the directors shall be made parties to the contest.