コード例 #1
0
        public void TestValidateThrowsIfMissingData()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                ContentType = "ContentType",
                Device      = GetValidDevice()
            };

            Assert.ThrowsException <ValidationException>(() => validErrorAttachmentLog.Validate());
        }
コード例 #2
0
        public void TestValidateThrowsIfMissingContentType()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                Data   = new byte[] { 1, 2, 3, 4 },
                Device = GetValidDevice()
            };

            Assert.ThrowsException <ValidationException>(() => validErrorAttachmentLog.Validate());
        }
コード例 #3
0
        public void TestValidateDoesNotThrowForValidLog()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                ContentType = "ContentType",
                Data        = new byte[] { 1, 2, 3, 4 },
                Device      = GetValidDevice()
            };

            // Pass if validate does not throw.
            validErrorAttachmentLog.Validate();
        }