public IEnumerable <int> ParseNotation(string notation) { ICronNotationParser cronNotationParser = parserFactory.GetApplicableParser(notation); if (cronNotationParser == null) { throw new InvalidNotationArgumentException(notation); } return(cronNotationParser.Parse(notation, GetTimeUnitLowerBound(), GetTimeUnitUpperBound())); }
public void GetApplicableParser_WhenInputStringIsStar_ReturnsObjectOfStarNotationParser() { string input = "*"; var result = _sut.GetApplicableParser(input); result.GetType().Equals(typeof(StarNotationParser)); }