@Test public void testAddTreatment() { client .createExperiment("exp") .apply(); client.addTreatment("exp", "control", "the control"); final TreatmentDto treatment = client.getTreatment("exp", "control"); assertEquals("control", treatment.getName()); assertEquals("the control", treatment.getDescription()); client.addTreatment("exp", "control"); final TreatmentDto treatment2 = client.getTreatment("exp", "control"); assertEquals("control", treatment2.getName()); assertNull(treatment2.getDescription()); }
public void addTreatment(String experimentName, String treatmentName, String description) { resource( ENDPOINT_TREATMENTS, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName ) ).put(Entity.json(new TreatmentDto(treatmentName, description))); }
AlchemyClient { public void addTreatment(String experimentName, String treatmentName, String description) { resource( ENDPOINT_TREATMENTS, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName ) ).put(Entity.json(new TreatmentDto(treatmentName, description))); } }
AlchemyClient { public void addTreatment(String experimentName, String treatmentName, String description) { resource( ENDPOINT_TREATMENTS, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName ) ).put(Entity.json(new TreatmentDto(treatmentName, description))); } AlchemyClient(AlchemyClientConfiguration configuration, Environment environment);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService,
                         ObjectMapper objectMapper);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService);  AlchemyClient(AlchemyClientConfiguration configuration); }
AlchemyClient { public void addTreatment(String experimentName, String treatmentName, String description) { resource( ENDPOINT_TREATMENTS, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName ) ).put(Entity.json(new TreatmentDto(treatmentName, description))); } AlchemyClient(AlchemyClientConfiguration configuration, Environment environment);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService,
                         ObjectMapper objectMapper);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService);  AlchemyClient(AlchemyClientConfiguration configuration); List<ExperimentDto> getExperiments(); GetExperimentsRequestBuilder getExperimentsFiltered(); ExperimentDto getExperiment(String experimentName); List<AllocationDto> getAllocations(String experimentName); List<TreatmentDto> getTreatments(String experimentName); TreatmentDto getTreatment(String experimentName, String treatmentName); List<TreatmentOverrideDto> getOverrides(String experimentName); TreatmentOverrideDto getOverride(String experimentName, String overrideName); CreateExperimentRequestBuilder createExperiment(String experimentName); void addTreatment(String experimentName, String treatmentName, String description); void addTreatment(String experimentName, String treatmentName); void addOverride(String experimentName,
                            String overrideName,
                            String treatmentName,
                            String filter); UpdateExperimentRequestBuilder updateExperiment(String experimentName); UpdateAllocationsRequestBuilder updateAllocations(String experimentName); TreatmentDto getActiveTreatment(String experimentName, IdentityDto identity); Map<String, TreatmentDto> getActiveTreatments(IdentityDto identity); void deleteExperiment(String experimentName); void clearAllocations(String experimentName); void removeTreatment(String experimentName, String treatmentName); UpdateTreatmentRequestBuilder updateTreatment(String experimentName, String treatmentName); void clearTreatments(String experimentName); void clearOverrides(String experimentName); void removeOverride(String experimentName, String overrideName); Map<String, Class<? extends IdentityDto>> getIdentityTypes(); JsonSchema getIdentitySchema(String identityType); Set<String> getIdentityAttributes(String identityType); }
AlchemyClient { public void addTreatment(String experimentName, String treatmentName, String description) { resource( ENDPOINT_TREATMENTS, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName ) ).put(Entity.json(new TreatmentDto(treatmentName, description))); } AlchemyClient(AlchemyClientConfiguration configuration, Environment environment);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService,
                         ObjectMapper objectMapper);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService);  AlchemyClient(AlchemyClientConfiguration configuration); List<ExperimentDto> getExperiments(); GetExperimentsRequestBuilder getExperimentsFiltered(); ExperimentDto getExperiment(String experimentName); List<AllocationDto> getAllocations(String experimentName); List<TreatmentDto> getTreatments(String experimentName); TreatmentDto getTreatment(String experimentName, String treatmentName); List<TreatmentOverrideDto> getOverrides(String experimentName); TreatmentOverrideDto getOverride(String experimentName, String overrideName); CreateExperimentRequestBuilder createExperiment(String experimentName); void addTreatment(String experimentName, String treatmentName, String description); void addTreatment(String experimentName, String treatmentName); void addOverride(String experimentName,
                            String overrideName,
                            String treatmentName,
                            String filter); UpdateExperimentRequestBuilder updateExperiment(String experimentName); UpdateAllocationsRequestBuilder updateAllocations(String experimentName); TreatmentDto getActiveTreatment(String experimentName, IdentityDto identity); Map<String, TreatmentDto> getActiveTreatments(IdentityDto identity); void deleteExperiment(String experimentName); void clearAllocations(String experimentName); void removeTreatment(String experimentName, String treatmentName); UpdateTreatmentRequestBuilder updateTreatment(String experimentName, String treatmentName); void clearTreatments(String experimentName); void clearOverrides(String experimentName); void removeOverride(String experimentName, String overrideName); Map<String, Class<? extends IdentityDto>> getIdentityTypes(); JsonSchema getIdentitySchema(String identityType); Set<String> getIdentityAttributes(String identityType);  }