private byte[] PrepareContent(List <QueueSignedIdentifier> signedIdentifiers)
        {
            var sb = new StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<SignedIdentifiers>");

            foreach (var identifier in signedIdentifiers)
            {
                sb.AppendFormat("<SignedIdentifier><Id>{0}</Id><AccessPolicy><Start>{1:o}</Start><Expiry>{2:o}</Expiry><Permission>{3}</Permission></AccessPolicy></SignedIdentifier>",
                                identifier.Id,
                                identifier.AccessPolicy.StartTime,
                                identifier.AccessPolicy.Expiry,
                                SharedAccessPermissionParse.ConvertToString(identifier.AccessPolicy.Permission));
            }
            sb.Append("</SignedIdentifiers>");

            return(UTF8Encoding.UTF8.GetBytes(sb.ToString()));
        }
        public void ConvertToString_FlagEnum_ConvertsToStringWithMatchingCodes(QueueSharedAccessPermissions permission, string expectedCode)
        {
            var result = SharedAccessPermissionParse.ConvertToString(permission);

            Assert.AreEqual(expectedCode, result);
        }
        public void ConvertToString_IndividualEnum_ConvertsToMatchingLetter(QueueSharedAccessPermissions permission, string expectedCode)
        {
            var result = SharedAccessPermissionParse.ConvertToString(permission);

            Assert.AreEqual(expectedCode, result);
        }