public void ImportStringsStreamWithDuplicateStrings()
        {
            var existingStringsStream = new SerializedStringsStream(StringsStream.DefaultName, Encoding.UTF8.GetBytes(
                                                                        "\0"
                                                                        + "String\0"
                                                                        + "String\0"
                                                                        + "String\0"));

            var buffer = new StringsStreamBuffer();

            buffer.ImportStream(existingStringsStream);
            var newStream = buffer.CreateStream();

            Assert.Equal("String", newStream.GetStringByIndex(1));
            Assert.Equal("String", newStream.GetStringByIndex(8));
            Assert.Equal("String", newStream.GetStringByIndex(15));
        }
        public void ImportStringStreamShouldIndexExistingStrings()
        {
            var existingStringsStream = new SerializedStringsStream(StringsStream.DefaultName, Encoding.UTF8.GetBytes(
                                                                        "\0"
                                                                        + "String\0"
                                                                        + "LongerString\0"
                                                                        + "AnEvenLongerString\0"));

            var buffer = new StringsStreamBuffer();

            buffer.ImportStream(existingStringsStream);
            var newStream = buffer.CreateStream();

            Assert.Equal("String", newStream.GetStringByIndex(1));
            Assert.Equal("LongerString", newStream.GetStringByIndex(8));
            Assert.Equal("AnEvenLongerString", newStream.GetStringByIndex(21));
        }