public void SutIsSpecification()
 {
     // Fixture setup
     var dummyTarget = new object();
     // Exercise system
     var sut = new EqualRequestSpecification(dummyTarget);
     // Verify outcome
     Assert.IsAssignableFrom<IRequestSpecification>(sut);
     // Teardown
 }
 public void IsSatisfiedByTargetReturnsCorrectResult()
 {
     // Fixture setup
     var target = new object();
     var sut = new EqualRequestSpecification(target);
     // Exercise system
     var actual = sut.IsSatisfiedBy(target);
     // Verify outcome
     Assert.True(actual);
     // Teardown
 }
 public void TargetIsCorrect()
 {
     // Fixture setup
     var expected = new object();
     var sut = new EqualRequestSpecification(expected);
     // Exercise system
     var actual = sut.Target;
     // Verify outcome
     Assert.Equal(expected, actual);
     // Teardown
 }
 public void IsSatisfiedByReturnsResultFromComparer(bool expected)
 {
     // Fixture setup
     var target = new object();
     var other = new object();
     var comparer = new DelegatingEqualityComparer
     {
         OnEquals = (x, y) => x == target && y == other && expected
     };
     var sut = new EqualRequestSpecification(target, comparer);
     // Exercise system
     var actual = sut.IsSatisfiedBy(other);
     // Verify outcome
     Assert.Equal(expected, actual);
     // Teardown
 }
 public void ComparerIsCorrect()
 {
     // Fixture setup
     var expected = new DelegatingEqualityComparer();
     var dummyTarget = new object();
     var sut = new EqualRequestSpecification(dummyTarget, expected);
     // Exercise system
     IEqualityComparer actual = sut.Comparer;
     // Verify outcome
     Assert.Equal(expected, actual);
     // Teardown
 }