@Test public void testGetControlAlternative() { String name = "test-experiment"; Alternative one = new Alternative("one"); Alternative two = new Alternative("two"); Alternative three = new Alternative("three"); Experiment experiment = new ExperimentBuilder(mockSixpack) .withName(name) .withAlternatives(one, two, three) .build(); assertEquals(one, experiment.getControlAlternative()); }
public Alternative getControlAlternative() { return alternatives.iterator().next(); }
Experiment { public Alternative getControlAlternative() { return alternatives.iterator().next(); } }
Experiment { public Alternative getControlAlternative() { return alternatives.iterator().next(); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); }
Experiment { public Alternative getControlAlternative() { return alternatives.iterator().next(); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); ParticipatingExperiment participate(); PrefetchedExperiment prefetch(); boolean hasForcedChoice(); @Override String toString(); Alternative getControlAlternative(); }
Experiment { public Alternative getControlAlternative() { return alternatives.iterator().next(); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); ParticipatingExperiment participate(); PrefetchedExperiment prefetch(); boolean hasForcedChoice(); @Override String toString(); Alternative getControlAlternative(); final Sixpack sixpack; final String name; final Set<Alternative> alternatives; final Alternative forcedChoice; final Double trafficFraction; }