@Test public void testAsGenotypeLocations() { Genome genome = new Genome("profileId", "ACGT__"); Genotype genotype = genome.asGenotype("rs41362547", "rs28358280", "rs3915952"); assertEquals(genome.getProfileId(), genotype.getProfileId()); assertEquals("AC", genotype.getValues().get("rs41362547")); assertEquals("GT", genotype.getValues().get("rs28358280")); assertEquals("__", genotype.getValues().get("rs3915952")); }
@Test public void testAsGenotype() { StringBuilder sb = new StringBuilder(); for (String location : Locations.locations()) { sb.append("AC"); } Genome genome = new Genome("profileId", sb.toString()); Genotype genotype = genome.asGenotype(); assertEquals(genome.getProfileId(), genotype.getProfileId()); for (String location : Locations.locations()) { assertEquals("AC", genotype.getValues().get(location)); } }