/// <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; }
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); }
public void IsNotNullOrEmpty_Throws_Nothing(ICollection value, string parameter, string message) { Assert.That(() => Precondition.IsNotNullOrEmpty(value, parameter, message, message), Throws.Nothing); }
public void IsNotNullOrEmpty_Throws_Nothing(ICollection value) { Assert.That(() => Precondition.IsNotNullOrEmpty(value), Throws.Nothing); }
public void IsNotNullOrEmpty_Throws_Nothing(string value, string parameter) { Assert.That(() => Precondition.IsNotNullOrEmpty(value, parameter), Throws.Nothing); }