public void TestBasics()
        {
            var hrefTest = new HaystackReference("a");
            var str      = new HaystackString("string");
            List <HaystackValue> items = new List <HaystackValue>();

            items.Add(hrefTest);
            items.Add(str);

            var list = new HaystackList(items);

            Assert.AreEqual(list.Count, 2);
            Assert.AreEqual(list[0], hrefTest);
            Assert.AreEqual(list[1], str);
        }
        private void WriteList(HaystackList list)
        {
            WriteValue('[');
            bool isFirst = true;

            foreach (var item in list)
            {
                if (isFirst)
                {
                    isFirst = false;
                }
                else
                {
                    WriteValue(',');
                }
                WriteValue(item);
            }
            WriteValue(']');
        }