public void IsInvalid_Time() { var now = DateTime.Now; var item = new AppointmentDto() { EndTime = now, StartTime = now.AddHours(4), Subject = Guid.NewGuid().ToString(), }; Assert.IsFalse(item.IsValid()); }
public void IsInvalid_Subject() { var now = DateTime.Now; var item = new AppointmentDto() { EndTime = now.AddHours(4), StartTime = now, Subject = string.Empty, }; Assert.IsFalse(item.IsValid()); }
public void IsValid() { var now = DateTime.Now; var item = new AppointmentDto() { EndTime = now.AddHours(4), StartTime = now, Subject = Guid.NewGuid().ToString(), Tag = new TagDto(TagCategory.Appointment) { Id = 14 }, }; Assert.IsTrue(item.IsValid()); }