public void AddBehavior_uses_configuration_delegate(IEndpoint endpoint, Action <TestEndpointBehavior> configurationAction)
        {
            EndpointExtensions.AddBehavior <TestEndpointBehavior>(endpoint, configurationAction);

            Mock.Get(configurationAction).Verify(p => p(It.IsAny <TestEndpointBehavior>()), Times.Once);
        }
        public void AddBehavior_creates_new_instance_of_behavior(IEndpoint endpoint)
        {
            var result = EndpointExtensions.AddBehavior <TestEndpointBehavior>(endpoint);

            Assert.That(endpoint.Behaviors, Has.One.InstanceOf <TestEndpointBehavior>());
        }
        public void AddBehavior_returns_same_endpoint(IEndpoint endpoint)
        {
            var result = EndpointExtensions.AddBehavior <TestEndpointBehavior>(endpoint);

            Assert.That(result, Is.SameAs(endpoint));
        }
        public void AddBehavior_adds_behavior_to_endpoint(IEndpoint endpoint, TestEndpointBehavior testBehavior)
        {
            EndpointExtensions.AddBehavior(endpoint, testBehavior);

            Assert.That(endpoint.Behaviors, Has.One.InstanceOf <TestEndpointBehavior>());
        }