예제 #1
0
 public IExperimentOptionsBuilder <T, TPublish> AreEqual(AreEqualDelegate <T> compare)
 {
     if (compare == null)
     {
         throw new ArgumentNullException("compare");
     }
     steps.AreEqual = compare;
     return(this);
 }
예제 #2
0
        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);
        }
예제 #3
0
 internal TextAttributeHelper(GetValueAtDelegate getValueDelegate, AreEqualDelegate areEqualDelegate)
 {
     _getValueDelegate = getValueDelegate;
     _areEqualDelegate = areEqualDelegate;
 }