public IExperimentOptionsBuilder <T, TPublish> AreEqual(AreEqualDelegate <T> compare) { if (compare == null) { throw new ArgumentNullException("compare"); } steps.AreEqual = compare; return(this); }
public void AreEqual(Mock <ISciencePublisher> publisher, Mock <IScienceExperiment <string, string> > experiment, string ctrlResult, Mock <IExperimentSteps <string, string> > steps) { //Setup publisher.SetupAllProperties(); experiment.SetupAllProperties(); steps.SetupAllProperties(); experiment.SetupGet(x => x.Steps).Returns(steps.Object); Func <string> control = () => ctrlResult; AreEqualDelegate <string> areEqual = (ctrl, cand) => ctrl == cand; //Exercise var sut = new Laboratory(publisher.Object, true); sut.CreateExperiment(experiment.Object) .Control(control) .AreEqual(areEqual); //Verify steps.VerifySet(x => x.AreEqual = areEqual, Times.Once); }
internal TextAttributeHelper(GetValueAtDelegate getValueDelegate, AreEqualDelegate areEqualDelegate) { _getValueDelegate = getValueDelegate; _areEqualDelegate = areEqualDelegate; }