public void Strips_header()
 {
     var reader = new JsonHeaderReader();
     var lines = content.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
     reader.StripJsonHeader(ref lines);
     lines.Length.ShouldEqual(1);
     lines[0].ShouldEqual("abc");
 }
        public void Builds_json_object()
        {
            var reader = new JsonHeaderReader();

            var lines = content.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
            var jsonHeader = reader.StripJsonHeader(ref lines);

            string title = (string) jsonHeader["title"];
            string something = (string) jsonHeader["something"];
            int numCategories = ((object[])jsonHeader["categories"]).Length;

            title.ShouldEqual("foo");
            something.ShouldEqual("bar");
            numCategories.ShouldEqual(3);
        }