public void ExposeProvidedStatus([Values] EStormFuncInputState state) { var content = Mock.Of <IStormContent <object> >(); var sut = new StormFuncInput <object>(content, state); Assert.That(sut.VisitState, Is.EqualTo(state)); }
public static string GetDescription(this EStormFuncInputState state) { return(state switch { EStormFuncInputState.NotVisited => "not visited", EStormFuncInputState.VisitedWithChange => "changed", EStormFuncInputState.VisitedWithoutChange => "unchanged", _ => throw new ArgumentOutOfRangeException(nameof(state), state, null) });
public StormFuncInput(IStormContent <T> content, EStormFuncInputState visitState) { if (!Enum.IsDefined(typeof(EStormFuncInputState), visitState)) { throw new ArgumentOutOfRangeException(nameof(visitState)); } Content = content ?? throw new ArgumentNullException(nameof(content)); VisitState = visitState; }
public void GetDescriptionReturns([Values] EStormFuncInputState state) { Assert.That(string.IsNullOrWhiteSpace(state.GetDescription()), Is.False); }
public string ToString(IStormContent <object> content, EStormFuncInputState state) { var sut = new StormFuncInput <object>(content, state); return(sut.ToString()); }