@Test public void shouldConstructFactoryWithVersionDetectionFromClass() { IRaygunClientFactory factory = getFactory("apiKey").withVersionFrom(org.apache.commons.io.IOUtils.class); RaygunClient client = getClient(factory); assertEquals("2.5", client.string); assertEquals("apiKey", client.apiKey); }
public RaygunClientFactory withVersionFrom(Class versionFromClass) { version = raygunMessageBuilderFactory.newMessageBuilder().setVersionFrom(versionFromClass).build().getDetails().getVersion(); return this; }
RaygunClientFactory implements IRaygunClientFactory { public RaygunClientFactory withVersionFrom(Class versionFromClass) { version = raygunMessageBuilderFactory.newMessageBuilder().setVersionFrom(versionFromClass).build().getDetails().getVersion(); return this; } }
RaygunClientFactory implements IRaygunClientFactory { public RaygunClientFactory withVersionFrom(Class versionFromClass) { version = raygunMessageBuilderFactory.newMessageBuilder().setVersionFrom(versionFromClass).build().getDetails().getVersion(); return this; } RaygunClientFactory(String apiKey); }
RaygunClientFactory implements IRaygunClientFactory { public RaygunClientFactory withVersionFrom(Class versionFromClass) { version = raygunMessageBuilderFactory.newMessageBuilder().setVersionFrom(versionFromClass).build().getDetails().getVersion(); return this; } RaygunClientFactory(String apiKey); RaygunClientFactory withBeforeSend(IRaygunSendEventFactory<IRaygunOnBeforeSend> onBeforeSend); RaygunClientFactory withAfterSend(IRaygunSendEventFactory<IRaygunOnAfterSend> onAfterSend); RaygunClientFactory withFailedSend(IRaygunSendEventFactory<IRaygunOnFailedSend> onFailedSend); RaygunClientFactory withApiKey(String apiKey); RaygunClientFactory withVersion(String version); RaygunClientFactory withVersionFrom(Class versionFromClass); RaygunClientFactory withMessageBuilder(IRaygunMessageBuilderFactory messageBuilderFactory); RaygunClientFactory withOfflineStorage(); RaygunClientFactory withOfflineStorage(String storageDir); RaygunClientFactory withBreadcrumbLocations(); RaygunClientFactory withTag(String tag); Set<String> getTags(); void setTags(Set<String> tags); Map<?, ?> getData(); void setData(Map<?, ?> data); RaygunClientFactory withData(Object key, Object value); RaygunClientFactory withWrappedExceptionStripping(Class... stripWrappers); RaygunClientFactory withExcludedExceptions(Class... excludedWrappers); RaygunClient newClient(); T buildClient(T client); AbstractRaygunSendEventChainFactory<IRaygunOnBeforeSend> getRaygunOnBeforeSendChainFactory(); AbstractRaygunSendEventChainFactory getRaygunOnAfterSendChainFactory(); AbstractRaygunSendEventChainFactory getRaygunOnFailedSendChainFactory(); }
RaygunClientFactory implements IRaygunClientFactory { public RaygunClientFactory withVersionFrom(Class versionFromClass) { version = raygunMessageBuilderFactory.newMessageBuilder().setVersionFrom(versionFromClass).build().getDetails().getVersion(); return this; } RaygunClientFactory(String apiKey); RaygunClientFactory withBeforeSend(IRaygunSendEventFactory<IRaygunOnBeforeSend> onBeforeSend); RaygunClientFactory withAfterSend(IRaygunSendEventFactory<IRaygunOnAfterSend> onAfterSend); RaygunClientFactory withFailedSend(IRaygunSendEventFactory<IRaygunOnFailedSend> onFailedSend); RaygunClientFactory withApiKey(String apiKey); RaygunClientFactory withVersion(String version); RaygunClientFactory withVersionFrom(Class versionFromClass); RaygunClientFactory withMessageBuilder(IRaygunMessageBuilderFactory messageBuilderFactory); RaygunClientFactory withOfflineStorage(); RaygunClientFactory withOfflineStorage(String storageDir); RaygunClientFactory withBreadcrumbLocations(); RaygunClientFactory withTag(String tag); Set<String> getTags(); void setTags(Set<String> tags); Map<?, ?> getData(); void setData(Map<?, ?> data); RaygunClientFactory withData(Object key, Object value); RaygunClientFactory withWrappedExceptionStripping(Class... stripWrappers); RaygunClientFactory withExcludedExceptions(Class... excludedWrappers); RaygunClient newClient(); T buildClient(T client); AbstractRaygunSendEventChainFactory<IRaygunOnBeforeSend> getRaygunOnBeforeSendChainFactory(); AbstractRaygunSendEventChainFactory getRaygunOnAfterSendChainFactory(); AbstractRaygunSendEventChainFactory getRaygunOnFailedSendChainFactory();  }