use of org.glassfish.security.services.api.common.Attributes in project Payara by payara.
the class AttributesTest method testAttributesReplace.
@Test
public void testAttributesReplace() {
String attName = "test";
Attributes att = new AttributesImpl();
att.addAttribute(attName, "value1", false);
att.addAttribute(attName, "value2", true);
Set<String> vs = att.getAttributeValues(attName);
Assert.assertEquals(1, vs.size());
Assert.assertFalse(vs.contains("value1"));
Assert.assertTrue(vs.contains("value2"));
}
use of org.glassfish.security.services.api.common.Attributes in project Payara by payara.
the class AttributesTest method testAttributesNull.
@Test
public void testAttributesNull() {
String attName = "test";
Attributes att = new AttributesImpl();
att.addAttribute(attName, (String) null, false);
Set<String> vs = att.getAttributeValues(attName);
Assert.assertEquals(0, vs.size());
}
Aggregations