private static void CheckSurveyIdIsGiven(Entity.Command command) { if (OptionParser.CountOptions("i", command) != 1) { throw new Exception("You must specify the ID"); } }
private static void CheckCommandParametersValidity(Entity.Command command) { if (OptionParser.CountOptions("q", command) != 1) { throw new Exception("You must specify a question"); } if (OptionParser.CountOptions("c", command) < 2) { throw new Exception("You must specify at least 2 choices"); } }