예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
        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());
        }