public void Init_CreatesUser_returns_UserType() { //Arrange var user = new User() { FirstName = "test", LastName = "test", Nationality = "testland", Email = "*****@*****.**", BirthDate = DateTime.Now.AddYears(-12).Date }; var detailViewModel = new DetailViewModel(); detailViewModel.Init(user); //Act var detailUser = detailViewModel.GetUser(); //Assert Assert.IsType <User>(detailUser); }
public void Init_CreatesUser_returns_NotNull_Nationality() { //Arrange var expected = new User() { FirstName = "test", LastName = "test", Nationality = "testland", Email = "*****@*****.**", BirthDate = DateTime.Now.AddYears(-12).Date }; var detailViewModel = new DetailViewModel(); detailViewModel.Init(expected); //Act var detailUser = detailViewModel.GetUser(); //Assert Assert.NotNull(detailUser.Nationality); }
public void Init_CreatesUser_returns_NotNull_BirthDate() { //Arrange var expected = new User() { FirstName = "test", LastName = "test", Nationality = "testland", Email = "*****@*****.**", BirthDate = DateTime.Now.AddYears(-12).Date }; var detailViewModel = new DetailViewModel(); detailViewModel.Init(expected); //Act var detailUser = detailViewModel.GetUser(); //Assert //Ik kreeg hiervoor een waarschuwing dus converteer ik het hier naar een string. Assert.NotNull(detailUser.BirthDate.ToShortDateString()); }