WebappProperty { public CsrfProperties getCsrf() { return csrf; }  boolean isIndexRedirectEnabled(); void setIndexRedirectEnabled(boolean indexRedirectEnabled); String getWebjarClasspath(); void setWebjarClasspath(String webjarClasspath); String getSecurityConfigFile(); void setSecurityConfigFile(String securityConfigFile); CsrfProperties getCsrf(); void setCsrf(CsrfProperties csrf); HeaderSecurityProperties getHeaderSecurity(); void setHeaderSecurity(HeaderSecurityProperties headerSecurity); @Override String toString(); static final String PREFIX; }
@Test public void testCsrfProperty() { assertThat(webapp.getCsrf()).isNotNull(); }
@Test public void testCsrfTargetOriginProperty() { assertThat(webapp.getCsrf().getTargetOrigin()).isNotNull(); assertThat(webapp.getCsrf().getTargetOrigin()).isNotBlank(); assertThat(webapp.getCsrf().getTargetOrigin()).isEqualTo("localhost:8080"); }
@Test public void testCsrfDenyStatusProperty() { assertThat(webapp.getCsrf().getDenyStatus()).isNotNull(); assertThat(webapp.getCsrf().getDenyStatus()).isEqualTo(405); }
@Test public void testCsrfRandomClassProperty() { assertThat(webapp.getCsrf().getRandomClass()).isNotNull(); assertThat(webapp.getCsrf().getRandomClass()).isEqualTo("java.util.Random"); }
@Test public void testCsrfEntryPointsProperty() { assertThat(webapp.getCsrf().getEntryPoints()).isNotNull(); assertThat(webapp.getCsrf().getEntryPoints()).isNotEmpty(); assertThat(webapp.getCsrf().getEntryPoints()).isInstanceOf(List.class); assertThat(webapp.getCsrf().getEntryPoints().size()).isEqualTo(2); assertThat(webapp.getCsrf().getEntryPoints().get(0)).isEqualTo("/api/engine/engine/default/history/task/count"); assertThat(webapp.getCsrf().getEntryPoints().get(1)).isEqualTo("/api/engine/engine/default/history/variable/count"); }