public void IsSatisfiedByReturnsCorrectResult(bool expectedResult, IEnumerable<bool> decoratedResults)
 {
     // Fixture setup
     var decoratedSpecs = from b in decoratedResults
                          select new DelegatingRequestSpecification { OnIsSatisfiedBy = r => b };
     var sut = new AndRequestSpecification(decoratedSpecs.Cast<IRequestSpecification>());
     // Exercise system
     var dummyRequest = new object();
     var result = sut.IsSatisfiedBy(dummyRequest);
     // Verify outcome
     Assert.Equal(expectedResult, result);
     // Teardown
 }
 public void IsSatisfiedByPassesRequestToDecoratedSpecification()
 {
     // Fixture setup
     var expectedRequest = new object();
     var verified = false;
     var specMock = new DelegatingRequestSpecification { OnIsSatisfiedBy = r => verified = expectedRequest == r };
     var sut = new AndRequestSpecification(specMock);
     // Exercise system
     sut.IsSatisfiedBy(expectedRequest);
     // Verify outcome
     Assert.True(verified, "Mock verified");
     // Teardown
 }