예제 #1
0
        public void GetSizeInBytes()
        {
            var bdict = new BDictionary
            {
                // 6 + 5
                { "spam", "egg" },
                // 6 + 3 + 3 + 3 + 3 (+ 2)
                { "list", new BList {
                      1, 2, 3
                  } },
                // 5 + 5
                { "str", "abc" },
                // 5 + 4
                { "num", 42 }
            }; // 2

            bdict.GetSizeInBytes().Should().Be(49);
        }