/// <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;
 }
Exemplo n.º 2
0
        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>();
        }
Exemplo n.º 3
0
        public ICardActionAssertions ActionType(CardActionType type)
        {
            _stringHelpers.TestForMatch(_cardAction.Type, CardActionTypeMap.Map(type), CreateEx(nameof(_cardAction.Type), type.ToString()));

            return(this);
        }
Exemplo n.º 4
0
        public ICardActionAssertions ActionType(CardActionType type)
        {
            _setHelpers.TestSetForMatch(CardActions, action => action.That().ActionType(type), CreateEx(nameof(CardAction.Type), type.ToString()));

            return(this);
        }
Exemplo n.º 5
0
        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 = "")
 {
 }