Esempio n. 1
0
            public void Should_Render_The_Provided_Text_As_Normal(string text, string expected)
            {
                // Given
                var argument = new TextArgument(text);

                // When
                var result = argument.RenderSafe();

                // Then
                Assert.Equal(expected, result);
            }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="KeyValueArgument"/> class.
        /// </summary>
        /// <param name="key">The key of the argument.</param>
        /// <param name="value">The argument value.</param>
        /// <param name="format">The format of argument.</param>
        public KeyValueArgument(string key, TextArgument value, string format)
        {
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentNullException(nameof(key));
            }
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            if (string.IsNullOrEmpty(format))
            {
                throw new ArgumentNullException(nameof(format));
            }

            _Key    = key;
            _Value  = value;
            _Format = format;
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyValueArgument"/> class.
 /// </summary>
 /// <param name="key">The key of the argument.</param>
 /// <param name="value">The value of the argument.</param>
 public KeyValueArgument(string key, TextArgument value)
     : this(key, value, KeyValueArgument.DefaultFormat)
 {
 }