public void Namespace_and_action_set_string() { IntentSignature name = "AMAZON.CancelIntent"; Assert.Equal("AMAZON", name.Namespace); Assert.Equal("CancelIntent", name.Action); }
public void Intent_action_set_string() { var expected = "CancelIntent"; IntentSignature name = expected; Assert.Equal(expected, name.Action); }
public void Complex_intent_single_property() { const string complexIntentSingleProperty = "AMAZON.SearchAction<object@WeatherForecast>"; IntentSignature name = complexIntentSingleProperty; Assert.Equal("AMAZON", name.Namespace); Assert.Equal("SearchAction", name.Action); Assert.Equal(1, name.Properties.Count); Assert.True(name.Properties.ContainsKey("object")); Assert.Equal("WeatherForecast", name.Properties["object"].Entity); }
public void Complex_intent_two_properties() { const string complexIntentTwoProperties = "AMAZON.AddAction<object@Book,targetCollection@ReadingList>"; IntentSignature name = complexIntentTwoProperties; Assert.Equal("AMAZON", name.Namespace); Assert.Equal("AddAction", name.Action); Assert.Equal(2, name.Properties.Count); Assert.True(name.Properties.ContainsKey("object")); Assert.Equal("Book", name.Properties["object"].Entity); Assert.True(name.Properties.ContainsKey("targetCollection")); Assert.Equal("ReadingList", name.Properties["targetCollection"].Entity); }