@Test public void testClearOverrides() { delete(ENDPOINT_OVERRIDES, EXPERIMENT_BAD) .assertStatus(Status.NOT_FOUND); assertNotNull(experiment(EXPERIMENT_1).getOverride(EXP_1_OVERRIDE)); delete(ENDPOINT_OVERRIDES, EXPERIMENT_1) .assertStatus(Status.NO_CONTENT); assertNull(experiment(EXPERIMENT_1).getOverride(EXP_1_OVERRIDE)); }
@DELETE public void clearOverrides(@PathParam("experimentName") String experimentName) { ensureExists(experiments.get(experimentName)) .clearOverrides() .save(); }
TreatmentOverridesResource extends BaseResource { @DELETE public void clearOverrides(@PathParam("experimentName") String experimentName) { ensureExists(experiments.get(experimentName)) .clearOverrides() .save(); } }
TreatmentOverridesResource extends BaseResource { @DELETE public void clearOverrides(@PathParam("experimentName") String experimentName) { ensureExists(experiments.get(experimentName)) .clearOverrides() .save(); } @Inject  TreatmentOverridesResource(Experiments experiments, Mappers mapper); }
TreatmentOverridesResource extends BaseResource { @DELETE public void clearOverrides(@PathParam("experimentName") String experimentName) { ensureExists(experiments.get(experimentName)) .clearOverrides() .save(); } @Inject  TreatmentOverridesResource(Experiments experiments, Mappers mapper); @GET @Path("/{overrideName}") TreatmentOverrideDto getOverride(@PathParam("experimentName") String experimentName,
                                            @PathParam("overrideName") String overrideName); @GET Iterable<TreatmentOverrideDto> getOverrides(@PathParam("experimentName") String experimentName); @PUT Response addOverride(@PathParam("experimentName") String experimentName,
                                @Valid TreatmentOverrideRequest request); @DELETE void clearOverrides(@PathParam("experimentName") String experimentName); @DELETE @Path("/{overrideName}") void removeOverride(@PathParam("experimentName") String experimentName,
                               @PathParam("overrideName") String overrideName); }
TreatmentOverridesResource extends BaseResource { @DELETE public void clearOverrides(@PathParam("experimentName") String experimentName) { ensureExists(experiments.get(experimentName)) .clearOverrides() .save(); } @Inject  TreatmentOverridesResource(Experiments experiments, Mappers mapper); @GET @Path("/{overrideName}") TreatmentOverrideDto getOverride(@PathParam("experimentName") String experimentName,
                                            @PathParam("overrideName") String overrideName); @GET Iterable<TreatmentOverrideDto> getOverrides(@PathParam("experimentName") String experimentName); @PUT Response addOverride(@PathParam("experimentName") String experimentName,
                                @Valid TreatmentOverrideRequest request); @DELETE void clearOverrides(@PathParam("experimentName") String experimentName); @DELETE @Path("/{overrideName}") void removeOverride(@PathParam("experimentName") String experimentName,
                               @PathParam("overrideName") String overrideName);  }