public void ShouldRetrieveLinkedResource() { ISmtpClient smtpClient = new EmailClient(); var imageSource = $@"{AppDomain.CurrentDomain.SetupInformation.ApplicationBase}Utils\Images\govuklogo.png"; var imageId = "someid"; byte[] expectedBytes = StreamExtensions.GetBytesFromFile(imageSource); LinkedResource resource = smtpClient.GetLinkedResource(imageSource, imageId); byte[] actualBytes = resource.ContentStream.ReadAllBytes(); Assert.AreEqual(imageId, resource.ContentId); Assert.AreEqual(expectedBytes, actualBytes); }