Exemplo n.º 1
0
        public void getCarMPGTest_noresponse()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
            }
                                                     );
            var intent          = new GetMileage();
            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.");
        }
Exemplo n.º 2
0
        public void getCarMPGTest_nonsense()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
                { "m", "University of the Texas at Arlington" },
            }
                                                     );
            var intent          = new GetMileage();
            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.");
        }
Exemplo n.º 3
0
        public void getCarMPGTest_onlymodel()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
                { "Model", "Camry" },
            }
                                                     );
            var intent          = new GetMileage();
            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?");
        }
Exemplo n.º 4
0
        public void getCarMPGTest_2nonmandatory2()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {
                    {"Model", "Camry" },
                    {"Year", "2012" },
                }
            );
            var intent =  new GetMileage();
            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?");
        }
Exemplo n.º 5
0
        public void getCarMPGTest_2nonmandatory()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
                { "Make", "Toyota" },
                { "Year", "2012" },
            }
                                                     );
            var intent          = new GetMileage();
            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?");
        }
Exemplo n.º 6
0
        public void getCarMPGTest_3good()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
                { "Make", "BMW" },
                { "Model", "5 Series" },
                { "Year", "2014" }
            }
                                                     );
            var intent          = new GetMileage();
            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 17 in the city and 25 on the highway");
        }
Exemplo n.º 7
0
        public void getCarMPGTest_3notfullmodel()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary <string, string>()
            {
                { "Make", "Mazda" },
                { "Model", "CX" },
                { "Year", "2014" }
            }
                                                     );
            var intent          = new GetMileage();
            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.");
        }
Exemplo n.º 8
0
        public void getCarMPGTest_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 GetMileage();
            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 21 in the city and 31 on the highway");
        }
Exemplo n.º 9
0
        public void getCarMPGTest_onlymake()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {
                    {"Make", "Toyota" },
                }
            );
            var intent =  new GetMileage();
            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?");
        }
Exemplo n.º 10
0
        public void getCarMPGTest_noresponse()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {

                }
            );
            var intent =  new GetMileage();
            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.");
        }
Exemplo n.º 11
0
        public void getCarMPGTest_nonsense()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {
                    {"m","University of the Texas at Arlington" },
                }
            );
            var intent =  new GetMileage();
            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.");
        }
Exemplo n.º 12
0
        public void getCarMPGTest_3notfullmodel()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {
                    {"Make", "Mazda" },
                    {"Model", "CX" },
                    {"Year", "2014" }
                }
            );
            var intent =  new GetMileage();
            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.");
        }
Exemplo n.º 13
0
        public void getCarMPGTest_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 GetMileage();
            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 21 in the city and 31 on the highway");
        }
Exemplo n.º 14
0
        public void getCarMPGTest_3good()
        {
            AlexaService.Cache.CacheManager.AddSlots(new Dictionary<string, string>()
                {
                    {"Make", "BMW" },
                    {"Model", "5 Series" },
                    {"Year", "2014" }
                }
            );
            var intent =  new GetMileage();
            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 17 in the city and 25 on the highway");
        }