public void When_validating_and_the_type_is_not_specified() { _builder .CanCreateFrom(_props) .ShouldHaveSingleItem() .ShouldContain("Type was not specified"); }
public ConditionID AddCondition(EditorID editor, Dictionary <string, object> conditionProperties, ConditionID parentConditionID = null) { var messages = _conditionBuilder.CanCreateFrom(conditionProperties).ToArray(); if (messages.Any()) { throw new ConditionException(messages.First()); } ValidateParentCondition(parentConditionID); var conditionID = NextConditionID(); ApplyEvent(new ConditionAdded(editor, conditionID, parentConditionID, conditionProperties)); return(conditionID); }