public void TestValidateThrowsIfMissingData() { var validErrorAttachmentLog = new ErrorAttachmentLog { ContentType = "ContentType", Device = GetValidDevice() }; Assert.ThrowsException <ValidationException>(() => validErrorAttachmentLog.Validate()); }
public void TestValidateThrowsIfMissingContentType() { var validErrorAttachmentLog = new ErrorAttachmentLog { Data = new byte[] { 1, 2, 3, 4 }, Device = GetValidDevice() }; Assert.ThrowsException <ValidationException>(() => validErrorAttachmentLog.Validate()); }
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(); }