public void ConvertTest3()
        {
            var unknownFrame = new UnknownFrame
                                   {
                                       Descriptor =
                                           {
                                               Id = "ABCD",
                                               ReadOnly = true
                                           },
                                   };

            unknownFrame.SetContent(new byte[] {0x30, 0x31, 0x32, 0x33});

            RawFrame rawFrame = unknownFrame.Convert(TagVersion.Id3V23);
            Assert.AreEqual(rawFrame.Id, "ABCD");
            Assert.AreEqual(rawFrame.Payload.Count, 4);
            Assert.AreEqual(rawFrame.Payload[0], 0x30);
            Assert.AreEqual(rawFrame.Payload[1], 0x31);
            Assert.AreEqual(rawFrame.Payload[2], 0x32);
            Assert.AreEqual(rawFrame.Payload[3], 0x33);

            Assert.AreEqual(rawFrame.Options.TagAlterPreservation, false, "Tag Alter Preservation failed.");
            Assert.AreEqual(rawFrame.Options.FileAlterPreservation, false, "File Alter Preservation failed.");
            Assert.AreEqual(rawFrame.Options.ReadOnly, true, "Read Only Failed.");
            Assert.AreEqual(rawFrame.Options.Compression, false, "Compression failed.");
            Assert.AreEqual(rawFrame.Options.Encryption, false, "Encryption failed.");
            Assert.AreEqual(rawFrame.Options.GroupingIdentify, false, "Grouping Identify failed.");
        }
        private static IFrame AnalyseFrameId(RawFrame rawFrame, IFrameCreationService frameService)
        {
            string id = rawFrame.Id;
            IFrame frame = null;

            if (frameService.Search(id))
            {
                //
                //  Get the specific frame instance
                //
                frame = frameService.GetFrameInstance(id);
            }
            else
            {
                if (id[0] == 'T' && id[1] != 'X')
                {
                    //
                    // Handle Textfames
                    //
                    frame = frameService.GetTextFrame();
                }

                if (id[0] == 'W' && id[1] != 'X')
                {
                    //
                    // Handle Web Frames
                    //
                    frame = frameService.GetUrlLinkFrame();
                }
            }

            if (frame == null)
            {
                //
                //  If all is failed then create an Unknown frame instance
                //
                frame = new UnknownFrame();
            }

            return frame;
        }
        public void ImportTest()
        {
            var payload = new byte[] {0x30, 0x31, 0x32, 0x33};
            var flags = new FrameOptions();
            var rawFrame = new RawFrameV3("ABCD", flags, payload);

            var frame = new UnknownFrame();
            frame.Import(rawFrame, 0);

            Assert.AreEqual("ABCD", frame.Descriptor.Id);
            Assert.That(frame.Content, Is.EquivalentTo(payload));
        }