Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-2852

Refactor the ElytronXmlParserTest class to reduce repeated code

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      The following lines are repeated between multiple test functions:

      URL config = getClass().getResource("test-wildfly-config-v1_4.xml");
      SecurityFactory<AuthenticationContext> authContext = ElytronXmlParser.parseAuthenticationClientConfiguration(config.toURI());
      Assert.assertNotNull(authContext);
      

      See https://github.com/wildfly-security/wildfly-elytron/blob/2.x/auth/client/src/test/java/org/wildfly/security/auth/client/ElytronXmlParserTest.java#L140-L142.

      The class can be refactored by moving the repeated code to a helper method and then updating the existing code to call the helper method instead.

              rhn-support-pesilva Pedro Silva
              fjuma1@redhat.com Farah Juma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: