Example #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;
     }
 }
Example #2
0
        public void Urgency_WhenParameterlesslyConstructed_IsInstantiated()
        {
            //Arrange: An ugency pointer is declared.
            Urgency ugency;

            //Act: The pointer is constructed without parameters.
            ugency = new Urgency();

            //Assert: The pointer is no longer null.
            Assert.AreNotEqual(null, ugency);
        }