Skip to content

Commit

Permalink
Test fix #174
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Oct 12, 2023
1 parent c1c92f4 commit 7dddfb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;

import com.helger.commons.ValueEnforcer;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.state.ETriState;
import com.helger.phase4.CAS4;
Expand Down Expand Up @@ -152,10 +153,14 @@ public static PModeReceptionAwareness generatePModeReceptionAwareness ()
@Nonnull
public static PMode createTestPMode (@Nonnull @Nonempty final String sInitiatorID,
@Nonnull @Nonempty final String sResponderID,
@Nullable final String sResponderAddress,
@Nonnull @Nonempty final String sResponderAddress,
@Nonnull final IPModeIDProvider aPModeIDProvider,
final boolean bPersist)
{
ValueEnforcer.notEmpty (sInitiatorID, "InitiatorID");
ValueEnforcer.notEmpty (sResponderID, "ResponderID");
ValueEnforcer.notEmpty (sResponderAddress, "ResponderAddress");

final PModeParty aInitiator = PModeParty.createSimple (sInitiatorID, CAS4.DEFAULT_INITIATOR_URL);
final PModeParty aResponder = PModeParty.createSimple (sResponderID, CAS4.DEFAULT_RESPONDER_URL);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.helger.commons.concurrent.ThreadHelper;
import com.helger.commons.id.factory.FileIntIDFactory;
import com.helger.commons.id.factory.GlobalIDFactory;
import com.helger.commons.string.StringHelper;
import com.helger.commons.url.URLHelper;
import com.helger.phase4.AS4TestConstants;
import com.helger.phase4.config.AS4Configuration;
Expand Down Expand Up @@ -60,9 +61,14 @@ private MockJettySetup ()
@Nonempty
public static String getServerAddressFromSettings ()
{
return AS4Configuration.getConfig ()
.getAsString (MockJettySetup.SETTINGS_SERVER_ADDRESS,
AS4TestConstants.DEFAULT_SERVER_ADDRESS);
final String ret = AS4Configuration.getConfig ()
.getAsString (MockJettySetup.SETTINGS_SERVER_ADDRESS,
AS4TestConstants.DEFAULT_SERVER_ADDRESS);
if (StringHelper.hasNoText (ret))
throw new IllegalStateException ("Configuration property '" +
MockJettySetup.SETTINGS_SERVER_ADDRESS +
"' is missing");
return ret;
}

private static boolean _isRunJetty ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IPMode findPMode (@Nonnull final Ebms3SignalMessage aSignalMessage)
{
final PMode aPMode = TestPMode.createTestPMode ("pullinitiator",
"pullresponder",
null,
"http://test.address.non/existing",
(i, r) -> "PullPMode",
false);
if (aSignalMessage.getPullRequest () != null)
Expand Down

0 comments on commit 7dddfb1

Please sign in to comment.