@Test public void testNoForcedChoice() { String name = "test-experiment"; Alternative test = new Alternative("test"); Experiment experiment = new ExperimentBuilder(mockSixpack) .withName(name) .withAlternatives(test) .build(); assertFalse(experiment.hasForcedChoice()); assertNull(experiment.forcedChoice); }
public boolean hasForcedChoice() { return forcedChoice != null; }
Experiment { public boolean hasForcedChoice() { return forcedChoice != null; } }
Experiment { public boolean hasForcedChoice() { return forcedChoice != null; } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); }
Experiment { public boolean hasForcedChoice() { return forcedChoice != null; } 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 boolean hasForcedChoice() { return forcedChoice != null; } 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; }