public void CheckCreateValuesTestNotMissing() { ValueUtils vu = new ValueUtils(); PersonValidation pv = new PersonValidation(vu); String str = ""; PersonViewModelSave PVmodel = new PersonViewModelSave(); PVmodel.PersonNummer = "12345"; PVmodel.ForNamn = "Per"; PVmodel.EfterNamn = "Nilsson"; Assert.True(pv.CheckCreateValues(PVmodel, ref str)); }
public void CheckCreateValuesTestNotValidPersnr() { ValueUtils vu = new ValueUtils(); PersonValidation pv = new PersonValidation(vu); String str = ""; PersonViewModelSave PVmodel = new PersonViewModelSave(); PVmodel.PersonNummer = "12"; PVmodel.ForNamn = "Per"; PVmodel.EfterNamn = "Nilsson"; Assert.True(pv.CheckCreateValues(PVmodel, ref str) == false); Assert.True(str == "Not a valid PersonNummer:"); }