public void Ageunder16() { // Arrange RegisterController regController = new RegisterController(_logger); Register newAccount = new Register(); newAccount.Email = "*****@*****.**"; newAccount.Password = "******"; newAccount.ValidationPassword = "******"; newAccount.Geboortedatum = DateTime.Today.Date; //Act int result = regController.GetAge(Convert.ToDateTime(newAccount.Geboortedatum)); //Assert if (result < 16) { Assert.IsNotNull(result); } }