access modifiers and constructors fix

This commit is contained in:
Filip Izydorczyk
2020-09-25 16:43:24 +02:00
parent ce4a5942d5
commit 44bcc24110
12 changed files with 25 additions and 38 deletions

View File

@ -17,20 +17,15 @@ import org.springframework.test.context.junit4.SpringRunner;
public class CourseServiceTest {
@Autowired
private CourseService courseService;
@Test
public void createAndDeleteCourse() {
Course course;
Course course = new Course("Testowy kurs", "TK");
int startAmmount = this.courseService.getCoursesAmmount();
// Create course
course = new Course();
course.setName("Testowy kurs");
course.setSymbol("TK");
courseService.save(course);
assertTrue(this.courseService.getCoursesAmmount() > startAmmount);
// Delete course
courseService.delete(course);
assertTrue(this.courseService.getCoursesAmmount() == startAmmount);
}