public void SutIsBehaviorExpectation()
 {
     // Fixture setup
     // Exercise system
     var sut = new CompositeBehaviorExpectation();
     // Verify outcome
     Assert.IsAssignableFrom<IBehaviorExpectation>(sut);
     // Teardown
 }
 public void ConstructedWithEnumerableBehaviorExpectationsIsCorrect()
 {
     // Fixture setup
     var expectations = new[] { new DelegatingBehaviorExpectation(), new DelegatingBehaviorExpectation(), new DelegatingBehaviorExpectation() }.Cast<IBehaviorExpectation>();
     var sut = new CompositeBehaviorExpectation(expectations);
     // Exercise system
     var result = sut.BehaviorExpectations;
     // Verify outcome
     Assert.True(expectations.SequenceEqual(result));
     // Teardown
 }
        public void VerifyVerifiesAllBehaviorExpectations()
        {
            // Fixture setup
            var observedCommands = new List<IGuardClauseCommand>();
            var expectations = Enumerable.Repeat(new DelegatingBehaviorExpectation { OnVerify = observedCommands.Add }, 3).ToArray();
            var sut = new CompositeBehaviorExpectation(expectations);

            var cmd = new DelegatingGuardClauseCommand();
            // Exercise system
            sut.Verify(cmd);
            // Verify outcome
            Assert.Equal(expectations.Length, observedCommands.Count(c => cmd.Equals(c)));
            // Teardown
        }