Exemplo n.º 1
0
  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);

    initXpath();

    doc = XmlUtils.parseXml(TestUtils.SAMPLE_SOAP_MESSAGE);

    secHeader = new WSSecHeader();
    secHeader.insertSecurityHeader(doc);

    manualSAMLentry = new ManualSAMLEntry();

    manualSAMLentry.init(wssEntryConfigMock, outgoingWssMock);

    when(wssEntryConfigMock.getConfiguration()).thenReturn(xmlObjectMock);
    when(contextMock.expand(TestUtils.SAMPLE_SAML_1_ASSERTION))
        .thenReturn(TestUtils.SAMPLE_SAML_1_ASSERTION);
  }
Exemplo n.º 2
0
 public void updateProperty(boolean prettyPrint) {
   if (context != null && propertyRef != null) {
     context.setProperty(propertyRef, prettyPrint ? getPrettyXml() : getXml());
   }
 }
Exemplo n.º 3
0
  public XmlHolder(PropertyExpansionContext context, String propertyRef) throws XmlException {
    this(context.getProperty(propertyRef).toString());

    this.context = context;
    this.propertyRef = propertyRef;
  }