public void GetErrorsBancaTest() { var banca = new Banca(); banca.Adresa = "x"; banca.Nume= "x"; banca.RC= "x"; var errors = banca.GetErrorString(); Assert.IsNotNull(errors); }
public void InsertBancaTest() { var banca = new Banca { Adresa="Str. Mihai Viteaza nr. 3 Bucuresti", CapitalSocial=123356567m, Cui="1039/asd", Nume="Banca Nationala", RC="RJO123.123" }; var result= banca.Save(); if (result.Status!=StatusEnum.Errors) { Assert.Fail(); } }
public void UpdateBancaTest() { var banca = new Banca { Adresa = "Str. Mihai Viteaza nr. 3 Modificata", CapitalSocial = 123m, Cui = "1039/aModificatasd", Nume = "Banca Nationala Modificata", RC = "RJO12Modificata3.123" }; banca.ID = 1; var result = banca.Save(); if (result.Status == StatusEnum.Errors) { Assert.Fail(); } }