public void when_read_bad_envelope_reference() { EnvelopeReference envelopeReference; var result = AzureMessageOverflows.TryReadAsEnvelopeReference(new byte[0], out envelopeReference); Assert.IsFalse(result); Assert.IsNull(envelopeReference); }
public void when_read_envelope_reference() { EnvelopeReference envelopeReference; var result = AzureMessageOverflows.TryReadAsEnvelopeReference(Encoding.Unicode.GetBytes("[cqrs-ref-r1]\r\ncontainer\r\nreference"), out envelopeReference); Assert.IsTrue(result); Assert.AreEqual("container", envelopeReference.StorageContainer); Assert.AreEqual("reference", envelopeReference.StorageReference); }
public void when_save_envelope_reference() { var result = Encoding.Unicode.GetString(AzureMessageOverflows.SaveEnvelopeReference(new EnvelopeReference("container", "reference"))); Assert.AreEqual("[cqrs-ref-r1]\r\ncontainer\r\nreference", result); }