Skip to content

Commit

Permalink
Fix export test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacodg committed Feb 5, 2025
1 parent be2a1e4 commit 6392bec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/test/java/nl/nn/testtool/test/junit/util/TestExport.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2021, 2023-2024 WeAreFrank!
Copyright 2021, 2023-2025 WeAreFrank!
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -127,10 +127,14 @@ public void testExport() throws IllegalAccessException, IllegalArgumentException
}
} else if (method.getParameters()[0].getType() == String.class) {
method.invoke(checkpoint, name);
} else if (name.equals("span")) {
checkpoint.setSpan(new Span());
} else if (name.equals("report")) {
// Ignore, this is done hardcoded above (search for "checkpoint.setReport(report)")
} else if (name.equals("messageContext")) {
Map<String, Object> messageContext = new HashMap<String, Object>();
messageContext.put("test", 1000);
checkpoint.setMessageContext(messageContext);
} else if (name.equals("span")) {
checkpoint.setSpan(new Span());
} else {
assertNull("Method not handled: " + name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
<void property="messageClassName">
<string>messageClassName</string>
</void>
<void property="messageContext">
<object class="java.util.HashMap">
<void method="put">
<string>test</string>
<int>1000</int>
</void>
</object>
</void>
<void property="name">
<string>name</string>
</void>
Expand Down

0 comments on commit 6392bec

Please sign in to comment.