예제 #1
0
        /// <inheritdoc />
        public IExecutableContext CreateExecutableContext(IDescribable describable)
        {
            var executableInfo = new ExecutableContext(describable);

            this.executables.Add(executableInfo);

            return(executableInfo);
        }
예제 #2
0
        /// <inheritdoc />
        public IExecutableContext CreateExecutableContext(IDescribable describable)
        {
            var executableInfo = new ExecutableContext(describable);

            this.executables.Add(executableInfo);

            return executableInfo;
        }
예제 #3
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);
        }
예제 #4
0
        public void Constructor_ShouldDescribe()
        {
            const string ExpectedName        = "Name";
            const string ExpectedDescription = "TestDescription";

            this.describable.Setup(d => d.Name).Returns(ExpectedName);
            this.describable.Setup(d => d.Describe()).Returns(ExpectedDescription);

            ExecutableContext testee = CreateTestee(this.describable.Object);

            testee.Name.Should().Be(ExpectedName);
            testee.Description.Should().Be(ExpectedDescription);
            this.describable.Verify(d => d.Describe());
        }
예제 #5
0
        public void Constructor_Behaviors_ShouldBeEmpty()
        {
            ExecutableContext testee = CreateTestee(Mock.Of <IDescribable>());

            testee.Behaviors.Should().BeEmpty();
        }