The genetic code for SARS-CoV-2 was released to the world on January 11th. https://www.cidrap.umn.edu/news-perspective/2020/01/china-releases-genetic-data-new-coronavirus-now-deadly
Samples were isolated from the airway epithelial cells of infected patients in Wuhan China in December 2019 and the new pathogen was sequenced shortly thereafter. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7180649/
The NCBI genome ID is 86693: https://www.ncbi.nlm.nih.gov/genome/?term=86693
How do you create a test that looks for specific genetic sequences when you don’t have a sample of the virus itself? Well, you look at the genetic sequences that distinguish the virus from all others and you design a test to look for them. It’s pretty straightforward.
The PCR test was initially validated by real viral isolates from the prior SARS (severe acute respiratory syndrome) outbreak of 2003.
However, researchers concede: “In the present case of 2019-nCoV (COVID-19), virus isolates or samples from infected patients have so far not become available to the international public health community.”
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3322935/