@Test public void testLeadingSiteCorrect() { TrialSite c = factory.getTrialSite(); validTrial.setLeadingSite(c); assertEquals(c, validTrial.getLeadingSite()); assertValid(validTrial); }
@Override public void setUp() { super.setUp(); authenticatAsAdmin(); validTrial = factory.getTrial(); validTrial.setLeadingSite(user.getPerson().getTrialSite()); validTrial.setSponsorInvestigator(user.getPerson()); // if(validTrial.getParticipatingSites().size()<2){ // // Person cp2 = new Person(); // cp2.setFirstname("Contact"); // cp2.setSurname("Person"); // cp2.setEmail("*****@*****.**"); // cp2.setPhone("1234567"); // cp2.setSex(Gender.MALE); // TrialSite trialSite1 = new TrialSite(); // trialSite1.setCity("Heidelberg"); // trialSite1.setCountry("Germany"); // trialSite1.setName("NCT"); // trialSite1.setPostcode("69120"); // trialSite1.setStreet("INF"); // trialSite1.setPassword("1$heidelberg"); // trialSite1.setContactPerson(cp2); // // trialSiteService.create(trialSite1); // validTrial.addParticipatingSite(trialSite1); // } }
@Test public void testLeadingSiteNotNull() { validTrial.setLeadingSite(null); assertNull(validTrial.getLeadingSite()); assertInvalid(validTrial); }