/// <summary> /// Creates an instance of Card class. /// </summary> /// <param name="title">Title text for the card</param> /// <param name="descriptions">List of descriptions to add to the card.</param> /// <param name="icon">One of the icons from the font-awesome collection (for e.g. fa-circle)</param> /// <param name="actionValue">Action value for the card (will be detectorId for detectors)</param> /// <param name="actionType">One of the supported ActionType</param> public Card(string title, List <string> descriptions, string icon, string actionValue, CardActionType actionType = CardActionType.Detector) { Title = title; Descriptions = descriptions; Icon = icon; ActionType = actionType; ActionValue = actionValue; }
public void TypeMatching_should_not_throw_when_card_action_type_matches_expected_type() { const CardActionType call = CardActionType.Call; var type = CardActionTypeMap.Map(call); var cardAction = new CardAction(type: type); var sut = new CardActionAssertions(cardAction); Action act = () => sut.ActionType(call); act.ShouldNotThrow <Exception>(); }
public ICardActionAssertions ActionType(CardActionType type) { _stringHelpers.TestForMatch(_cardAction.Type, CardActionTypeMap.Map(type), CreateEx(nameof(_cardAction.Type), type.ToString())); return(this); }
public ICardActionAssertions ActionType(CardActionType type) { _setHelpers.TestSetForMatch(CardActions, action => action.That().ActionType(type), CreateEx(nameof(CardAction.Type), type.ToString())); return(this); }
public static string Map(CardActionType type) { var typeName = Enum.GetName(typeof(CardActionType), type) ?? "Unknown"; return(char.ToLowerInvariant(typeName[0]) + typeName.Substring(1)); }
public void SetActionType(CardActionType thisType, string Mesg = "") { }