public void GetSchemaTest()
 {
     var(tables, elements) = _instance.GetSchema(_container);
     Assert.Equal(3, tables.Count);
     Assert.Equal(120, elements.Count);
     foreach (DataEntity element in elements)
     {
         Assert.NotEqual(string.Empty, element.DbDataType);
     }
 }
        public void TestGetSchema()
        {
            var fields = new Dictionary <string, DataType>()
            {
                { "id", DataType.String },
                { "deleted", DataType.Boolean },
                { "created.user", DataType.String },
                { "created.date", DataType.DateTime },
                { "modified.user", DataType.String },
                { "modified.date", DataType.DateTime },
                { "modified.date_utc", DataType.DateTime },
                { "assigned_user_id", DataType.String },
                { "team_id", DataType.Unknown },
                { "name", DataType.String },
                { "start.date", DataType.DateTime },
                { "start.time", DataType.DateTime },
                { "parent.type", DataType.String },
                { "parent.id", DataType.String },
                { "description.text", DataType.String },
                { "description.html", DataType.Unknown },
                { "from.addr", DataType.String },
                { "from.name", DataType.String },
            };

            var(collections, entities) = _instance.GetSchema(new DataContainer()
            {
                ConnectionString = $"{_container.ConnectionString}/key-collection-separator=:,key-levels=1,complex-values=true,complex-value-type=json"
            });

            Assert.True(collections.Count == 1);
            Assert.Equal("emails", collections[0].Name);
            Assert.Equal(30, entities.Count);

            foreach (var field in fields)
            {
                var entity = entities.Find(x => x.Name.Equals(field.Key));
                Assert.True(entity != null, $"Field {field.Key} exists");
                Assert.Equal(field.Value, entity.DataType);
            }
        }