private MemoryStream LoadAttachmentTransform() { var bytes = new byte[0]; var memoryStream = new MemoryStream(bytes); _transform = new AttachmentSignatureTransform(); _transform.LoadInput(memoryStream); return(memoryStream); }
public void ThenAttachmentSignatureTransformReturnsExpectedUrl() { // Arrange _transform = new AttachmentSignatureTransform(); // Act string url = _transform.Algorithm; // Assert const string attachmentSignature = "http://docs.oasis-open.org/wss/oasis-wss-SwAProfile-1.1" + "#Attachment-Content-Signature-Transform"; Assert.Equal(attachmentSignature, url); }
public void ThenOutputSucceedsWithXmlContentType(string contentType) { // Arrange using (var memoryStream = new MemoryStream()) { new XmlSerializer(typeof(PayloadInfo)).Serialize(memoryStream, new PayloadInfo()); memoryStream.Position = 0; _transform = new AttachmentSignatureTransform(contentType); _transform.LoadInput(memoryStream); // Act var output = _transform.GetOutput(typeof(Stream)) as Stream; // Assert Assert.NotEqual(memoryStream, output); } }
public GivenAttachmentSignatureTransformFacts() { _transform = new AttachmentSignatureTransform(); }