I would prepare an array of DnsQueries and iterate over it to run the test against each element.  Using switch-case looks somewhat weird.