public void Test_AgregarBilletes_150() { cajero = new Cajero(); int tipoBillete = 150; int cuantos = 10; cajero.AddBilletes(tipoBillete, cuantos); // Assert.AreEqual(cuantos, cajero.GetNumeroBilletes(tipoBillete)); }
public void Test_CrearCajeroSinDinero() { cajero = new Cajero(); Assert.AreEqual(0, cajero.GetNumeroBilletes(200)); Assert.AreEqual(0, cajero.GetNumeroBilletes(100)); Assert.AreEqual(0, cajero.GetNumeroBilletes(50)); Assert.AreEqual(0, cajero.GetNumeroBilletes(20)); Assert.AreEqual(0, cajero.GetNumeroBilletes(10)); }
public void Test_Cantidad_470_Devolver_2b200_1b50_1b20() { cajero = new Cajero(true); Dictionary <int, int> devuelve = cajero.GiveMeTheMoney(470); Assert.AreEqual(0, devuelve[10]); Assert.AreEqual(1, devuelve[20]); Assert.AreEqual(1, devuelve[50]); Assert.AreEqual(0, devuelve[100]); Assert.AreEqual(2, devuelve[200]); }
public void Test_RestarBilletes_200_5Iniciales_Menos6_NoDisponibles() { cajero = new Cajero(); int tipoBillete = 200; int cuantosIniciales = 5; int cuantosMenos = 6; cajero.AddBilletes(tipoBillete, cuantosIniciales); Assert.IsFalse(cajero.SubstractBilletes(tipoBillete, cuantosMenos)); }
public void Test_RestarBilletes_200_5Iniciales_Menos2_Disponible() { cajero = new Cajero(); int tipoBillete = 200; int cuantosIniciales = 5; int cuantosMenos = 2; cajero.AddBilletes(tipoBillete, cuantosIniciales); cajero.SubstractBilletes(tipoBillete, cuantosMenos); Assert.AreEqual(cuantosIniciales - cuantosMenos, cajero.GetNumeroBilletes(tipoBillete)); }
public void Test_Cantidad_1250_SinBilletes200_12b100_1b50() { cajero = new Cajero(true); cajero.SubstractBilletes(200, cajero.GetNumeroBilletes(200)); Dictionary <int, int> devuelve = cajero.GiveMeTheMoney(1250); Assert.AreEqual(0, devuelve[10]); Assert.AreEqual(0, devuelve[20]); Assert.AreEqual(1, devuelve[50]); Assert.AreEqual(12, devuelve[100]); Assert.AreEqual(0, devuelve[200]); }
public void Test_Cantidad_80_SinBilletes50_4b20() { cajero = new Cajero(true); cajero.SubstractBilletes(50, cajero.GetNumeroBilletes(50)); Dictionary <int, int> devuelve = cajero.GiveMeTheMoney(80); Assert.AreEqual(0, devuelve[10]); Assert.AreEqual(4, devuelve[20]); Assert.AreEqual(0, devuelve[50]); Assert.AreEqual(0, devuelve[100]); Assert.AreEqual(0, devuelve[200]); }
public void Test_Cantidad_19000_CantidadNoDisponible() { cajero = new Cajero(true); Dictionary <int, int> devuelve = cajero.GiveMeTheMoney(19000); }