public void Should_return_flatten_value()
        {
            var data =
                new NamedContentData()
                .AddField("field1",
                          new ContentFieldData()
                          .AddValue("de", 1)
                          .AddValue("en", 2))
                .AddField("field2",
                          new ContentFieldData()
                          .AddValue("de", null)
                          .AddValue("en", 4))
                .AddField("field3",
                          new ContentFieldData()
                          .AddValue("en", 6))
                .AddField("field4",
                          new ContentFieldData()
                          .AddValue("it", 7));

            var output = data.ToFlatten();

            var expected = new Dictionary <string, object>
            {
                { "field1", new ContentFieldData().AddValue("de", 1).AddValue("en", 2) },
                { "field2", new ContentFieldData().AddValue("de", null).AddValue("en", 4) },
                { "field3", (JValue)6 },
                { "field4", (JValue)7 }
            };

            Assert.True(expected.EqualsDictionary(output));
        }
        public void Should_return_flatten_value()
        {
            var output = source.ToFlatten();

            var expected = new Dictionary <string, object?>
            {
                {
                    "field1",
                    new ContentFieldData()
                    .AddValue("de", 1)
                    .AddValue("en", 2)
                },
                {
                    "field2",
                    new ContentFieldData()
                    .AddValue("de", JsonValue.Null)
                    .AddValue("it", 4)
                },
                { "field3", JsonValue.Create(6) },
                { "field4", JsonValue.Create(7) }
            };

            Assert.True(expected.EqualsDictionary(output));
        }