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); }
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()); }
public void Constructor_ShouldDescribe() { const string ExpectedName = "Name"; const string ExpectedDescription = "TestDescription"; A.CallTo(() => this.describable.Name).Returns(ExpectedName); A.CallTo(() => this.describable.Describe()).Returns(ExpectedDescription); ExecutableContext testee = CreateTestee(this.describable); testee.Name.Should().Be(ExpectedName); testee.Description.Should().Be(ExpectedDescription); A.CallTo(() => this.describable.Describe()).MustHaveHappened(); }
public void Constructor_Behaviors_ShouldBeEmpty() { ExecutableContext testee = CreateTestee(Mock.Of <IDescribable>()); testee.Behaviors.Should().BeEmpty(); }