Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
        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);
        }