use of org.wildfly.swarm.undertow.descriptors.WebXmlAsset in project wildfly-swarm by wildfly-swarm.
the class WebXmlAssetTest method testSingleContextParamValue.
@Test
public void testSingleContextParamValue() throws Exception {
WebXmlAsset asset = new WebXmlAsset();
assertThat(asset.getContextParam("my-param")).isNull();
asset.setContextParam("my-param", "myValue");
String paramValue = asset.getContextParam("my-param");
assertThat(paramValue).isNotNull();
assertThat(paramValue).isNotEmpty();
assertThat(paramValue).isEqualTo("myValue");
}
use of org.wildfly.swarm.undertow.descriptors.WebXmlAsset in project wildfly-swarm by wildfly-swarm.
the class WebXmlAssetTest method testMultipleContextParamValue.
@Test
public void testMultipleContextParamValue() throws Exception {
WebXmlAsset asset = new WebXmlAsset();
assertThat(asset.getContextParam("my-param")).isNull();
asset.setContextParam("my-param", "myValue1", "myValue2", "myValue3");
String paramValue = asset.getContextParam("my-param");
assertThat(paramValue).isNotNull();
assertThat(paramValue).isNotEmpty();
assertThat(paramValue).isEqualTo("myValue1,myValue2,myValue3");
}
use of org.wildfly.swarm.undertow.descriptors.WebXmlAsset in project wildfly-swarm by wildfly-swarm.
the class WebXmlAssetTest method testFormLoginConfig.
@Test
public void testFormLoginConfig() throws Exception {
WebXmlAsset asset = new WebXmlAsset();
asset.setFormLoginConfig("myRealm", "/login", "/error");
assertThat(asset.getLoginRealm("FORM")).isEqualTo("myRealm");
}
use of org.wildfly.swarm.undertow.descriptors.WebXmlAsset in project wildfly-swarm by wildfly-swarm.
the class WebXmlAssetTest method testInvalidContextParamName.
@Test
public void testInvalidContextParamName() throws Exception {
WebXmlAsset asset = new WebXmlAsset();
assertThat(asset.getContextParam(null)).isNull();
assertThat(asset.getContextParam("")).isNull();
assertThat(asset.getContextParam(" ")).isNull();
}
use of org.wildfly.swarm.undertow.descriptors.WebXmlAsset in project wildfly-swarm by wildfly-swarm.
the class WebXmlAssetTest method testUnsetLoginAuthMethod.
@Test
public void testUnsetLoginAuthMethod() throws Exception {
WebXmlAsset asset = new WebXmlAsset();
assertThat(asset.getLoginRealm("keycloak")).isNull();
}
Aggregations