Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpeechRecognition"/> class.
        /// </summary>
        /// <param name="uuid">The speech recognition service UUID.</param>
        /// <param name="language">The language for the speech recognition.</param>
        /// <param name="keywords">Keywords for the speech recognition.</param>
        /// <exception cref="ArgumentException"><em>uuid</em> or <em>language</em> is an empty
        /// string or contains whitespace characters, or <em>keywords</em> is an empty array.</exception>
        /// <exception cref="ArgumentNullException"><em>uuid</em>, <em>language</em> or
        /// <em>keywords</em> is <strong>null</strong>.</exception>
        public SpeechRecognition(string uuid, string language, string[] keywords)
        {
            Precondition.IsNotNullOrWhiteSpace(uuid, nameof(uuid));
            Precondition.IsNotNullOrWhiteSpace(language, nameof(language));
            Precondition.IsNotNullOrEmpty(keywords, nameof(keywords));

            Uuid     = uuid;
            Language = language;
            Keywords = keywords;
        }
Ejemplo n.º 2
0
 public void IsNotNullOrEmpty_Throws_ArgumentEmptyException(Culture culture, ICollection value, string parameter, string message, string expectedParameter, string expectedMessage)
 {
     AssertThrowsException <ArgumentEmptyException>(culture, () => Precondition.IsNotNullOrEmpty(value, parameter, null, message), expectedParameter, expectedMessage, null);
 }
Ejemplo n.º 3
0
 public void IsNotNullOrEmpty_Throws_Nothing(ICollection value, string parameter, string message)
 {
     Assert.That(() => Precondition.IsNotNullOrEmpty(value, parameter, message, message), Throws.Nothing);
 }
Ejemplo n.º 4
0
 public void IsNotNullOrEmpty_Throws_Nothing(ICollection value)
 {
     Assert.That(() => Precondition.IsNotNullOrEmpty(value), Throws.Nothing);
 }
Ejemplo n.º 5
0
 public void IsNotNullOrEmpty_Throws_Nothing(string value, string parameter)
 {
     Assert.That(() => Precondition.IsNotNullOrEmpty(value, parameter), Throws.Nothing);
 }