コード例 #1
0
        public void IsInvalid_NoDrug()
        {
            var item = new PrescriptionDto()
            {
                Notes = Guid.NewGuid().ToString(),
            };

            Assert.IsFalse(item.IsValid());
        }
コード例 #2
0
        public void IsInvalid_NoNotes()
        {
            var item = new PrescriptionDto()
            {
                Drug  = new DrugDto(),
                Notes = string.Empty,
            };

            Assert.IsFalse(item.IsValid());
        }
コード例 #3
0
        public void IsValid()
        {
            var item = new PrescriptionDto()
            {
                Drug  = new DrugDto(),
                Notes = Guid.NewGuid().ToString(),
                Tag   = new TagDto(TagCategory.Appointment)
                {
                    Id = 14
                },
            };

            Assert.IsTrue(item.IsValid());
        }