Search in sources :

Example 16 with Course

use of de.tum.in.www1.artemis.domain.Course in project ArTEMiS by ls1intum.

the class CourseResourceIntTest method equalsVerifier.

@Test
@Transactional
public void equalsVerifier() throws Exception {
    TestUtil.equalsVerifier(Course.class);
    Course course1 = new Course();
    course1.setId(1L);
    Course course2 = new Course();
    course2.setId(course1.getId());
    assertThat(course1).isEqualTo(course2);
    course2.setId(2L);
    assertThat(course1).isNotEqualTo(course2);
    course1.setId(null);
    assertThat(course1).isNotEqualTo(course2);
}
Also used : Course(de.tum.in.www1.artemis.domain.Course) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Timed (com.codahale.metrics.annotation.Timed)12 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)12 Course (de.tum.in.www1.artemis.domain.Course)9 URI (java.net.URI)7 ProgrammingExercise (de.tum.in.www1.artemis.domain.ProgrammingExercise)6 User (de.tum.in.www1.artemis.domain.User)6 BadRequestAlertException (de.tum.in.www1.artemis.web.rest.errors.BadRequestAlertException)6 Transactional (org.springframework.transaction.annotation.Transactional)5 de.tum.in.www1.artemis.domain (de.tum.in.www1.artemis.domain)3 de.tum.in.www1.artemis.service (de.tum.in.www1.artemis.service)3 HeaderUtil (de.tum.in.www1.artemis.web.rest.util.HeaderUtil)3 URISyntaxException (java.net.URISyntaxException)3 Test (org.junit.Test)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)3 HttpStatus (org.springframework.http.HttpStatus)3 ResponseEntity (org.springframework.http.ResponseEntity)3 Authentication (org.springframework.security.core.Authentication)3 org.springframework.web.bind.annotation (org.springframework.web.bind.annotation)3