Пример #1
0
        public void MultipleCharacterStrings()
        {
            int endOffset = 0;

            byte[] content = Helper.ReadFixture("CharacterString", "www.google.com-string");
            IList <CharacterString> characterStrings = CharacterString.GetAllFromArray(content, 0, out endOffset);

            Assert.Equal(3, characterStrings.Count);
            Assert.Equal(15, endOffset);

            CharacterString characterString = characterStrings[0];

            Assert.Equal("www", characterString.ToString());
            Assert.Equal(4, characterString.Size);

            characterString = characterStrings[1];

            Assert.Equal("google", characterString.ToString());
            Assert.Equal(7, characterString.Size);

            characterString = characterStrings[2];

            Assert.Equal("com", characterString.ToString());
            Assert.Equal(4, characterString.Size);
        }
Пример #2
0
 public TextResourceRecord(IResourceRecord record) :
     base(record)
 {
     TextData = CharacterString.GetAllFromArray(Data, 0);
 }
Пример #3
0
 public TextResourceRecord(IResourceRecord record, byte[] message, int dataOffset) :
     base(record)
 {
     TextData = CharacterString.GetAllFromArray(message, dataOffset);
 }