public void ExerciceTestMuscleWithNullName_Validate_Invalid() { //Arrange _entity = new Muscle { Name = null }; //Act var errorsList = new List <ValidationResult>(_entity.Validate(new ValidationContext(this))); //Assert Assert.IsTrue(errorsList.Count == 1); }
public void ExerciceTestMuscle_Validate_Valid() { //Arrange _entity = new Muscle { Name = new LocalizedString { French = "French", English = "English" } }; //Act var errorsList = new List <ValidationResult>(_entity.Validate(new ValidationContext(this))); //Assert Assert.IsTrue(errorsList.Count == 0); }