public void getCarColorTest_noresponse() { AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "The gas mileage of 2002 Toyota Camry is 26 in the city and 18 on the highway."); }
public void getCarColorTest_onlymodel() { AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { { "Model", "Camry" }, } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "What's the make of the car?"); }
public void getCarColorTest_2nonmandatory() { AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { { "Make", "Toyota" }, { "Year", "2012" }, } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "What's the model of the car?"); }
public void getCarColorTest_3badmake() { AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { { "Make", "Mazda" }, { "Model", "Camry" }, { "Year", "1995" } } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "I don't know at this time."); }
public void getCarColorTest_3good() { AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { { "Make", "BMW" }, { "Model", "5 Series" }, { "Year", "2014" } } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "The gas mileage of 2014 BMW 5 Series is 26 in the city and 37 on the highway"); }
public void getCarColorTest_3hyphen() { // User says Mercedes Benz. Should match against mercedes-benz AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>() { { "Make", "Mercedes Benz" }, { "Model", "S Class" }, { "Year", "2012" } } ); var intent = new GetColor(); var edmundsURL = intent.GenEdmundsURL(); var edmundsResponse = intent.GetEdmundsResponse(); var AlexaResponse = intent.GetAlexaResponse(); Assert.AreEqual(AlexaResponse.response.outputSpeech.text, "The gas mileage of 2012 Mercedes Benz S Class is 25 in the city and 19 on the highway"); }