public void PositiveTest_PlatesteAngajati() { Cont contfirma = new Cont(50); Cont contAngajat = new Cont(30); Salariat salariat = new Salariat("popescu", 15, contAngajat); Salariati salariati = new Salariati(); salariati.AdaugaSalariat(salariat); PlatesteAngajat plateste_angajat = new PlatesteAngajat(); plateste_angajat.PlatesteAngajati(contfirma, salariati.GetSalariati); Assert.AreEqual(45, contAngajat.GetBalance()); }
public void NegativeTest_PlatesteAngajati() { Cont contfirma = new Cont(50); Cont contAngajat = new Cont(30); Salariat salariat = new Salariat("popescu", 60, contAngajat); Salariati salariati = new Salariati(); salariati.AdaugaSalariat(salariat); PlatesteAngajat plateste_angajat = new PlatesteAngajat(); //act try { plateste_angajat.PlatesteAngajati(contfirma, salariati.GetSalariati); } catch (NotFundsException) { falgException = 1; } //asert Assert.AreEqual(1, falgException); }