public virtual void Format() { //Any nullable members are replaced with empty ones. if(Date == null){ Date = DateTime.MinValue; } if(Start_Time == null){ Start_Time = DateTime.MinValue; } if(End_Time == null){ End_Time = DateTime.MinValue; } if(urgency == null){ urgency = new Urgency(); } if(place == null){ place = new Place(); } if(Name == null){ Name = string.Empty; } if(Description == null){ Description = string.Empty; } }
public void Place_WhenParameterlesslyConstructed_IsInstantiated() { //Arrange: A place pointer is declared. Place place; //Act: The pointer is constructed without parameters. place = new Place(); //Assert: The pointer is no longer null. Assert.AreNotEqual(null, place); }