Created
March 2, 2018 13:36
-
-
Save avarabyeu/d9a59c5518c1626134e73e45e536f3f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ReportPortal4Listener extends BaseTestNGListener { | |
public ExtendedListener() { | |
super(Injector.create( | |
new ConfigurationModule(), | |
override(new ReportPortalClientModule()).with((Module) binder -> binder.bind(Serializer.class).toProvider(() -> { | |
ObjectMapper om = new ObjectMapper(); | |
om.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")); | |
om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | |
return new JacksonSerializer(om); | |
}), new TestNGAgentModule()) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment