public void IfRequiredFieldNotSetTest() { Assert.Throws <RequiredFieldException>(() => { var say = new Say(); say.GetRequestData(); }); }
public void IfActionAutoDefinedTest() { var parameter = new Dictionary <string, object> { { "language", "testing language" }, { "text", "testing text" }, { "barge-in", true } }; var say = new Say(parameter); Assert.AreEqual("say", say.GetRequestData()["action"]); }
public void RequestParamsTest() { var parameter = new Dictionary <string, object> { { "language", "testing language" }, { "text", "testing text" }, { "barge-in", true }, { "clear-digit-cache", true }, { "action", "say" } }; var say = new Say(parameter); Assert.AreEqual(parameter, say.GetRequestData()); say = new Say(); say.Language = "testing language"; say.Text = "testing text"; say.BargeIn = true; say.ClearDigitCache = true; Assert.AreEqual(parameter, say.GetRequestData()); }