Added testcase for SQL lesson 6a
This commit is contained in:
@ -4,6 +4,7 @@ import org.junit.Before;
|
||||
import org.owasp.webgoat.i18n.Language;
|
||||
import org.owasp.webgoat.i18n.PluginMessages;
|
||||
import org.owasp.webgoat.session.WebSession;
|
||||
import org.owasp.webgoat.session.WebgoatContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.embedded.LocalServerPort;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@ -33,6 +34,8 @@ public abstract class LessonTest {
|
||||
protected PluginMessages messages;
|
||||
@MockBean
|
||||
protected WebSession webSession;
|
||||
@Autowired
|
||||
private WebgoatContext context;
|
||||
@MockBean
|
||||
private Language language;
|
||||
|
||||
@ -40,6 +43,7 @@ public abstract class LessonTest {
|
||||
public void init() {
|
||||
when(webSession.getUserName()).thenReturn("unit-test");
|
||||
when(language.getLocale()).thenReturn(Locale.getDefault());
|
||||
when(webSession.getWebgoatContext()).thenReturn(context);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user