public void TestDevuelvaFormatoCorrectoDeFrasesClaves()
        {
            PlataformaStub plataforma  = new PlataformaStub("me gusta el futbol");
            AdapterAzure   adapter     = new AdapterAzure();
            List <string>  frases      = new List <string> ();
            List <string>  frasesAzure = adapter.GetFrasesClave(plataforma.RecibirMensaje());

            frases.Add("futbol");
            Assert.AreEqual(frases, frasesAzure);
        }
Пример #2
0
        public void TestSiRecibeNumeroDevuelveTipoNumero()
        {
            ArchivoInteraccionesStub archivo    = new ArchivoInteraccionesStub();
            PlataformaStub           plataforma = new PlataformaStub("500");
            ProcesadorStub           procesador = new ProcesadorStub();

            procesador.SetPlataforma(plataforma);

            TaggerMensajes tagger  = new TaggerMensajes(archivo, procesador);
            Mensaje        mensaje = tagger.EtiquetarMensaje();

            Assert.AreEqual(mensaje.Tipo(), TipoMensaje.Numero);
        }
Пример #3
0
        public void TestSiRecibeDesconocidoDevuelveTipoOtros()
        {
            ArchivoInteraccionesStub archivo    = new ArchivoInteraccionesStub();
            PlataformaStub           plataforma = new PlataformaStub("ajklsdfhnkajbsacbkzdbajkbf");
            ProcesadorStub           procesador = new ProcesadorStub();

            procesador.SetPlataforma(plataforma);

            TaggerMensajes tagger  = new TaggerMensajes(archivo, procesador);
            Mensaje        mensaje = tagger.EtiquetarMensaje();

            Assert.AreEqual(mensaje.Tipo(), TipoMensaje.Otros);
        }