コード例 #1
0
        public void TestValidatePropertiesReturnsFalseIfMissingData()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                ContentType = "ContentType",
                ErrorId     = Guid.NewGuid(),
                Id          = Guid.NewGuid()
            };

            Assert.IsFalse(validErrorAttachmentLog.ValidatePropertiesForAttachment());
        }
コード例 #2
0
        public void TestValidatePropertiesReturnsFalseIfInvalidAttachId()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                Data        = new byte[] { 1, 2, 3, 4 },
                ErrorId     = Guid.NewGuid(),
                ContentType = "ContentType",
            };

            Assert.IsFalse(validErrorAttachmentLog.ValidatePropertiesForAttachment());
        }
コード例 #3
0
        public void TestValidatePropertiesReturnsTrueIfValidData()
        {
            var validErrorAttachmentLog = new ErrorAttachmentLog
            {
                ContentType = "ContentType",
                ErrorId     = Guid.NewGuid(),
                Data        = new byte[] { 1, 2, 3, 4 },
                Id          = Guid.NewGuid()
            };

            Assert.IsTrue(validErrorAttachmentLog.ValidatePropertiesForAttachment());
        }