public void ReturnsValue_WhenValueIsSetInConstructor() { var testee = new Missable <string>(Value); testee.Value .Should().Be(Value); }
public TransitionContext(IStateDefinition <TState, TEvent> stateDefinition, Missable <TEvent> eventId, object eventArgument, INotifier <TState, TEvent> notifier) { this.StateDefinition = stateDefinition; this.EventId = eventId; this.EventArgument = eventArgument; this.Notifier = notifier; }
public TransitionContext(IState <TState, TEvent> sourceState, Missable <TEvent> eventId, object eventArgument, INotifier <TState, TEvent> notifier) { this.sourceState = sourceState; this.eventId = eventId; this.eventArgument = eventArgument; this.Notifier = notifier; }
public void ReturnsValue_WhenValueIsSetInConstructor() { var testee = new Missable<string>(Value); testee.Value .Should().Be(Value); }
public TransitionContext(IState <TState, TEvent> state, Missable <TEvent> eventId, object eventArgument, INotifier <TState, TEvent> notifier) { this.state = state; this.eventId = eventId; this.eventArgument = eventArgument; this.Notifier = notifier; this.records = new List <Record>(); }
public void ThrowsExceptionOnAccessingValue_WhenValueIsNotSet() { var testee = new Missable<string>(); // ReSharper disable once UnusedVariable Action action = () => { string v = testee.Value; }; action.ShouldThrow<InvalidOperationException>() .WithMessage("*missing*"); }
public void ThrowsExceptionOnAccessingValue_WhenValueIsNotSet() { var testee = new Missable <string>(); // ReSharper disable once UnusedVariable Action action = () => { string v = testee.Value; }; action.Should().Throw <InvalidOperationException>() .WithMessage("*missing*"); }
public void ReturnsNotMissing_WhenValueIsSetInConstructor() { var testee = new Missable<string>(Value); testee.IsMissing.Should().BeFalse(); }
public void ReturnsMissing_WhenNoValueIsSet() { var testee = new Missable<string>(); testee.IsMissing.Should().BeTrue(); }
public void ReturnsNotMissing_WhenValueIsSetInConstructor() { var testee = new Missable <string>(Value); testee.IsMissing.Should().BeFalse(); }
public void ReturnsMissing_WhenNoValueIsSet() { var testee = new Missable <string>(); testee.IsMissing.Should().BeTrue(); }