public void TestPrepararPlato()
        {
            IBascula basculaService = new BasculaService();
            ICocina  cocinaService  = new CocinaService();

            TurbomixService sut        = new TurbomixService(basculaService, cocinaService);
            Alimento        mAlimento1 = new Alimento();

            mAlimento1.Nombre = "Curry";
            mAlimento1.Peso   = 1.5F;
            Alimento mAlimento2 = new Alimento();

            mAlimento2.Nombre = "Queso";
            mAlimento2.Peso   = 5F;
            Receta mReceta = new Receta();

            mReceta.NombreAlimento1 = "Curry";
            mReceta.NombreAlimento2 = "Queso";
            mReceta.Peso1           = 1.5F;
            mReceta.Peso2           = 5F;

            Plato resultado = sut.PrepararPlato(mAlimento1, mAlimento2, mReceta);

            Assert.IsTrue(resultado is Plato);
        }
示例#2
0
        public void TestPesar()
        {
            Alimentos alimento1 = new Alimentos();

            alimento1.peso = 15;
            Alimentos alimento2 = new Alimentos();

            alimento2.peso = 30;
            IBascula procesoPesar = new BasculaService();
            //int resultado = procesoPesar.Pesar(alimento1, alimento2);
            //Assert.AreEqual(resultado, 45);
        }
示例#3
0
        public void init()
        {
            IBascula basculaService = new BasculaService();
            ICocina  cocinaService  = new CocinaService();

            sut              = new TurboMixService(basculaService, cocinaService);
            alimento1        = new Alimentos();
            alimento1.Nombre = "patata";
            alimento1.peso   = 25;

            alimento2        = new Alimentos();
            alimento2.Nombre = "zanahoria";
            alimento2.peso   = 35;
        }
示例#4
0
        public void TestPesarAlimentos()
        {
            Alimento lechuga = new Alimento();
            Alimento tomate  = new Alimento();

            lechuga.Peso = 2;
            tomate.Peso  = 2;

            IBascula sut   = new BasculaService();
            float    peso1 = sut.PesarAlimentos(lechuga);
            float    peso2 = sut.PesarAlimentos(tomate);

            float resultado = peso1 + peso2;

            Assert.AreEqual(resultado, 4);
        }
        public void TestPrepararPlatoConReceta()
        {
            IBascula basculaService = new BasculaService();
            ICocina  cocinaService  = new CocinaService();

            TurbomixService sut        = new TurbomixService(basculaService, cocinaService);
            Alimento        mAlimento1 = new Alimento(0.2f, false);

            mAlimento1.Nombre = "Curry";
            Alimento mAlimento2 = new Alimento(0.4f, false);

            mAlimento2.Nombre = "Queso";

            Receta receta = new Receta(mAlimento1, mAlimento2);

            sut.PrepararPlatoConReceta(mAlimento1, mAlimento2, receta);
        }
示例#6
0
        public void TestSumar()
        {
            IBasculaService pes = new BasculaService();

            Alimento a = new Alimento();

            a.peso = 25F;
            Alimento b = new Alimento();

            b.peso = 10.2F;

            float resultado1 = pes.Pesar(a);

            Assert.AreEqual(25F, resultado1);
            float resultado2 = pes.Pesar(b);

            Assert.AreEqual(10.2F, resultado2);
        }
        public void init()
        {
            IBasculaService basculaService = new BasculaService();
            ICocinaService  cocinaService  = new CocinaService();

            sut                 = new TurboMixService(basculaService, cocinaService);
            alimento1           = new Alimento();
            alimento1.Peso      = 1.5f;
            alimento1.Calentado = true;
            alimento2           = new Alimento();
            alimento2.Peso      = 5f;
            alimento2.Calentado = true;

            alimentoCocinado1           = new Alimento();
            alimentoCocinado1.Peso      = 1.5f;
            alimentoCocinado1.Calentado = true;
            alimentoCocinado2           = new Alimento();
            alimentoCocinado2.Peso      = 5f;
            alimentoCocinado2.Calentado = true;
        }
        public void TestPrepararPlato()
        {
            IBasculaService basculaService = new BasculaService();
            ICocinaService  cocinaService  = new CocinaService();

            TurbomixService sut        = new TurbomixService(basculaService, cocinaService, null);
            Alimento        mAlimento1 = new Alimento();

            mAlimento1.Nombre = "Curry";
            mAlimento1.Peso   = 1.5F;
            Alimento mAlimento2 = new Alimento();

            mAlimento2.Nombre = "Queso";
            mAlimento1.Peso   = 5F;

            Plato resultado = sut.PrepararPlato(mAlimento1, mAlimento2);

            Plato mPlato = new Plato(mAlimento1, mAlimento2);

            Assert.AreEqual(mPlato, resultado);
        }
        public void TestPrepararPlato()
        {
            IBascula basculaService = new BasculaService();
            ICocina  cocinaService  = new CocinaService();

            TurbomixService sut        = new TurbomixService(basculaService, cocinaService);
            Alimento        mAlimento1 = new Alimento();

            mAlimento1.Nombre = "Espagueti";
            mAlimento1.Peso   = 1.5F;
            Alimento mAlimento2 = new Alimento();

            mAlimento2.Nombre = "Tomate";
            mAlimento1.Peso   = 5F;

            Receta recetaEspaguetis = new Receta(mAlimento1, mAlimento2);

            Plato resultado = sut.PrepararPlato(mAlimento1, mAlimento2, recetaEspaguetis);

            Plato mPlato = new Plato(mAlimento1, mAlimento2);

            Assert.AreEqual(mPlato, resultado);
        }
        public void Init()
        {
            IBasculaService basculaService = new BasculaService();
            ICocinaService  cocinaService  = new CocinaService();

            sut               = new TurbomixService(basculaService, cocinaService, null);
            mAlimento1        = new Alimento();
            mAlimento1.Nombre = "Curry";
            mAlimento1.Peso   = 1.5F;
            mAlimento2        = new Alimento();
            mAlimento2.Nombre = "Queso";
            mAlimento2.Peso   = 5F;

            mAlimentoReceta1           = new Alimento();
            mAlimentoReceta1.Nombre    = "Curry";
            mAlimentoReceta1.Peso      = 1.4F;
            mAlimentoReceta1.Calentado = true;
            mAlimentoReceta2           = new Alimento();
            mAlimentoReceta2.Nombre    = "Queso";
            mAlimentoReceta2.Peso      = 3F;
            mAlimentoReceta2.Calentado = true;

            receta = new Receta(mAlimentoReceta1, mAlimentoReceta2);
        }