public void SutIsRequestSpecification()
 {
     // Fixture setup
     // Exercise system
     var sut = new OrRequestSpecification();
     // Verify outcome
     Assert.IsAssignableFrom<IRequestSpecification>(sut);
     // Teardown
 }
 public void SpecificationsMatchesConstrucotrSpecifications()
 {
     // Fixture setup
     var expectedSpecifications = new[] { new DelegatingRequestSpecification(), new DelegatingRequestSpecification(), new DelegatingRequestSpecification() };
     var sut = new OrRequestSpecification(expectedSpecifications.Cast<IRequestSpecification>());
     // Exercise system
     IEnumerable<IRequestSpecification> result = sut.Specifications;
     // Verify outcome
     Assert.True(expectedSpecifications.SequenceEqual(result));
     // Teardown
 }
 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 OrRequestSpecification(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 OrRequestSpecification(specMock);
     // Exercise system
     sut.IsSatisfiedBy(expectedRequest);
     // Verify outcome
     Assert.True(verified, "Mock verified");
     // Teardown
 }