Example usage for org.springframework.security.config.http SecurityFiltersAssertions assertEquals

List of usage examples for org.springframework.security.config.http SecurityFiltersAssertions assertEquals

Introduction

In this page you can find the example usage for org.springframework.security.config.http SecurityFiltersAssertions assertEquals.

Prototype

public static void assertEquals(List<String> filters) 

Source Link

Usage

From source file:org.springframework.security.config.doc.XsdDocumentedTests.java

@Test
public void parseWhenLatestXsdThenAllNamedSecurityFiltersAreDefinedAndOrderedProperly() throws IOException {
    XmlNode root = this.xml.parse(this.schemaDocumentLocation);

    List<String> nodes = root.child("schema").map(XmlNode::children).orElse(Stream.empty())
            .filter(node -> "simpleType".equals(node.simpleName())
                    && "named-security-filter".equals(node.attribute("name")))
            .flatMap(XmlNode::children).flatMap(XmlNode::children).map(node -> node.attribute("value"))
            .filter(StringUtils::isNotEmpty).collect(Collectors.toList());

    SecurityFiltersAssertions.assertEquals(nodes);
}