Appccelerate.Bootstrapper.Reporting.ExecutableContext.CreateBehaviorContext C# (CSharp) Method

CreateBehaviorContext() public method

public CreateBehaviorContext ( IDescribable describable ) : IBehaviorContext
describable IDescribable
return IBehaviorContext
        public IBehaviorContext CreateBehaviorContext(IDescribable describable)
        {
            var behaviorInfo = this.CreateBehaviorContextCore(describable);

            this.behaviors.Add(behaviorInfo);

            return behaviorInfo;
        }

Usage Example

Example #1
0
        public void CreateBehaviorContext_ShouldCreateBehaviorContext()
        {
            ExecutableContext testee = CreateTestee(Mock.Of <IDescribable>());

            var behaviorContext = testee.CreateBehaviorContext(Mock.Of <IDescribable>());

            testee.Behaviors.Should().NotBeEmpty()
            .And.HaveCount(1)
            .And.Contain(behaviorContext);
        }