owasp top10-2021 (#1235)

This commit is contained in:
René Zubcevic
2022-04-11 21:12:41 +02:00
committed by GitHub
parent 02c3f9551f
commit b32240f96b
27 changed files with 36 additions and 55 deletions

View File

@ -77,7 +77,7 @@ public class LessonMenuServiceTest {
when(l2.getTitle()).thenReturn("AA");
when(lessonTracker.isLessonSolved()).thenReturn(false);
when(course.getLessons(any())).thenReturn(Lists.newArrayList(l1, l2));
when(course.getCategories()).thenReturn(Lists.newArrayList(Category.ACCESS_CONTROL));
when(course.getCategories()).thenReturn(Lists.newArrayList(Category.A1));
when(userTracker.getLessonTracker(any(Lesson.class))).thenReturn(lessonTracker);
when(userTrackerRepository.findByUser(any())).thenReturn(userTracker);
@ -93,7 +93,7 @@ public class LessonMenuServiceTest {
when(l1.getTitle()).thenReturn("ZA");
when(lessonTracker.isLessonSolved()).thenReturn(true);
when(course.getLessons(any())).thenReturn(Lists.newArrayList(l1));
when(course.getCategories()).thenReturn(Lists.newArrayList(Category.ACCESS_CONTROL));
when(course.getCategories()).thenReturn(Lists.newArrayList(Category.A1));
when(userTracker.getLessonTracker(any(Lesson.class))).thenReturn(lessonTracker);
when(userTrackerRepository.findByUser(any())).thenReturn(userTracker);

View File

@ -20,7 +20,7 @@ class UserTrackerRepositoryTest {
@Override
public Category getDefaultCategory() {
return Category.AJAX_SECURITY;
return Category.CLIENT_SIDE;
}
@Override

View File

@ -26,8 +26,6 @@ import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.StreamException;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.owasp.webgoat.lessons.vulnerable_components.Contact;
import org.owasp.webgoat.lessons.vulnerable_components.ContactImpl;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;