Examples of SecurityConfigurationXpp3Writer


Examples of org.sonatype.security.configuration.model.io.xpp3.SecurityConfigurationXpp3Writer

      {
        @Override
        public void write(final BufferedOutputStream output)
            throws IOException
        {
          new SecurityConfigurationXpp3Writer().write(output, configuration);
        }
      });
    }
    finally {
View Full Code Here

Examples of org.sonatype.security.configuration.model.io.xpp3.SecurityConfigurationXpp3Writer

  }

  private void resultIsFine(String path, SecurityConfiguration configuration)
      throws Exception
  {
    SecurityConfigurationXpp3Writer w = new SecurityConfigurationXpp3Writer();

    StringWriter sw = new StringWriter();

    w.write(sw, configuration);

    String actual = sw.toString();
    actual = actual.replace("\r\n", "\n");

    String shouldBe = IOUtils.toString(getClass().getResourceAsStream(path + ".result"));
View Full Code Here

Examples of org.sonatype.security.model.io.xpp3.SecurityConfigurationXpp3Writer

  }

  protected void resultIsFine(String path, Configuration configuration)
      throws Exception
  {
    SecurityConfigurationXpp3Writer w = new SecurityConfigurationXpp3Writer();

    StringWriter sw = new StringWriter();

    w.write(sw, configuration);

    String shouldBe = IOUtils.toString(getClass().getResourceAsStream(path + ".result"));
    shouldBe = shouldBe.replace("\r\n", "\n");

    assertEquals(shouldBe, sw.toString());
View Full Code Here

Examples of org.sonatype.security.model.io.xpp3.SecurityConfigurationXpp3Writer

  }

  protected void resultIsFine(String path, Configuration configuration)
      throws Exception
  {
    SecurityConfigurationXpp3Writer w = new SecurityConfigurationXpp3Writer();

    StringWriter sw = new StringWriter();

    w.write(sw, configuration);

    String shouldBe = IOUtils.toString(getClass().getResourceAsStream(path + ".result"));
    shouldBe = shouldBe.replace("\r\n", "\n");

    assertEquals(shouldBe, sw.toString());
View Full Code Here

Examples of org.sonatype.security.model.io.xpp3.SecurityConfigurationXpp3Writer

    {
      @Override
      public void write(final BufferedOutputStream output)
          throws IOException
      {
        new SecurityConfigurationXpp3Writer().write(output, configuration);
      }
    });
  }
View Full Code Here

Examples of org.sonatype.security.model.io.xpp3.SecurityConfigurationXpp3Writer

    try (FileWriter fileWriter = new FileWriter(securityXML)) {
      config.getUsers().get(0).setEmail("testLoadConfigWithInvalidEmail");
      userId = config.getUsers().get(0).getId();

      SecurityConfigurationXpp3Writer writer = new SecurityConfigurationXpp3Writer();
      writer.write(fileWriter, config);
    }

    // FIXME: unsure about the intent of this test...
    // now restart the security
    // this.getSecuritySystem().start();
View Full Code Here

Examples of org.sonatype.security.model.io.xpp3.SecurityConfigurationXpp3Writer

    );

    modifier.apply(configuration);

    final File modified = util.resolveFile("target/modified-security.xml");
    new SecurityConfigurationXpp3Writer().write(
        new FileOutputStream(modified),
        configuration
    );
    assertThat(
        normalizeLineEndings(readFileToString(modified)),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.