예제 #1
0
        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));
        }
예제 #2
0
        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:");
        }