Search in sources :

Example 6 with Speaker

use of site.model.Speaker in project jprime by bgjug.

the class CommonCfpControllerTest method twitterHandleShouldNotStartWithAt.

@Test
public void twitterHandleShouldNotStartWithAt() throws Exception {
    Speaker testSpeaker = new Speaker();
    testSpeaker.setTwitter("@speaker");
    testCfpController.fixTwitterHandle(testSpeaker);
    assertThat(testSpeaker.getTwitter(), is("speaker"));
}
Also used : Speaker(site.model.Speaker) Test(org.junit.Test)

Example 7 with Speaker

use of site.model.Speaker in project jprime by bgjug.

the class CommonCfpControllerTest method shouldSupportSpeakerWithNullTwitterHandle.

@Test
public void shouldSupportSpeakerWithNullTwitterHandle() throws Exception {
    Speaker testSpeaker = new Speaker();
    testCfpController.fixTwitterHandle(testSpeaker);
    assertThat(testSpeaker.getTwitter(), is(nullValue()));
}
Also used : Speaker(site.model.Speaker) Test(org.junit.Test)

Example 8 with Speaker

use of site.model.Speaker in project jprime by bgjug.

the class SessionControllerTest method setup.

@Before
public void setup() throws Exception {
    mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();
    this.forgeSubmission = submissionRepository.save(new Submission("Forge with me", "Forge is the best", SessionLevel.BEGINNER, SessionType.ConferenceSession, new Speaker("Ivan St.", "Ivanov", "ivan.st.ivanov@example.com", "The Forge Guy", "@forge", false, true)));
    forgeSubmission.setStatus(SubmissionStatus.ACCEPTED);
    Submission bootSubmission = submissionRepository.save(new Submission("Spring Boot", "Bootiful or what?", SessionLevel.BEGINNER, SessionType.ConferenceSession, new Speaker("Nayden", "Gochev", "nayden.gochev@example.com", "The Spring Guy", "@sprink", true, true)));
    bootSubmission.setStatus(SubmissionStatus.ACCEPTED);
    this.betaHall = venueHallRepository.save(new VenueHall("Beta", "600 seats"));
    venueHallRepository.save(new VenueHall("Alpha", "400 seats"));
    this.bootSession = sessionRepository.save(new Session(bootSubmission, DateTime.now(), DateTime.now(), betaHall));
}
Also used : VenueHall(site.model.VenueHall) Submission(site.model.Submission) Speaker(site.model.Speaker) Session(site.model.Session) Before(org.junit.Before)

Aggregations

Speaker (site.model.Speaker)8 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 Transactional (javax.transaction.Transactional)2 Before (org.junit.Before)2 Test (org.junit.Test)2 Submission (site.model.Submission)2 Session (site.model.Session)1 VenueHall (site.model.VenueHall)1