예제 #1
0
        public void FacturaConDosProductGetTotal()
        {
            Factura factura = new Factura();
            Producto producto1 = new Producto(10);
            Producto producto2 = new Producto(20);
            factura.AddProducto(producto1, 2);
            factura.AddProducto(producto2, 1);

            Assert.AreEqual(40, factura.GetTotal());
        }
예제 #2
0
        public void FacturaVaciaTotalEnCero()
        {
            Factura factura = new Factura();

            Assert.AreEqual(0, factura.GetTotal());
        }
예제 #3
-1
        public void FacturaConUnProductGetTotal()
        {
            Factura factura = new Factura();
            Producto producto = new Producto(10);
            factura.AddProducto(producto, 2);

            Assert.AreEqual(20, factura.GetTotal());
        }