private void CtnShouldHaveValueState <T>(Ctn <T> ctnValue, T expectedValue) { ctnValue.Should().NotBeNull(); ctnValue.Content.Should().Be(expectedValue); ctnValue.Should().NotBeNull(); ctnValue.ScenarioTitle.ShouldBeNone(); ctnValue.StepOutcomes.Should().BeEmpty(); }
private void CtnExceptionShouldHaveErrorState(Ctn <ExceptionDispatchInfo> ctnEx) { ctnEx.Should().NotBeNull(); ctnEx.Content.Should().NotBeNull(); ctnEx.Content.SourceException.Should().NotBeNull(); ctnEx.Content.SourceException.GetType().Should().Be <ApplicationException>(); ctnEx.Content.SourceException.Message.Should().Be(ErrorMessage); ctnEx.Should().NotBeNull(); ctnEx.ScenarioTitle.ShouldBeNone(); ctnEx.StepOutcomes.Should().BeEmpty(); }
public void Ctor_NoTitle_CreatesCtnCorrectly() { var ctn = new Ctn <int>(DefaultValue, None); ctn.Should().NotBeNull(); ctn.Content.Should().Be(DefaultValue); ctn.StepOutcomes.Should().NotBeNull(); ctn.StepOutcomes.Count.Should().Be(0); ctn.ScenarioTitle.ShouldBeNone(); }
public void Ctor_TitleAndList_CreatesCtnCorrectly() { var ctn = new Ctn <int>(DefaultValue, new List <StepOutcome>(), ScenarioTitle); ctn.Should().NotBeNull(); ctn.Content.Should().Be(DefaultValue); ctn.StepOutcomes.Should().NotBeNull(); ctn.StepOutcomes.Count.Should().Be(0); ctn.ScenarioTitle.ShouldBeSome(title => title.Should().Be(ScenarioTitle)); }
public void Ctor_NullReferenceType_DoesNotThrow() { var ctn = new Ctn <string>(null, None); ctn.Should().NotBeNull(); ctn.Content.Should().Be(null); ctn.StepOutcomes.Should().NotBeNull(); ctn.StepOutcomes.Count.Should().Be(0); ctn.ScenarioTitle.ShouldBeNone(); }