public void TestDefaultContextParentNestedIntArrayEqualsNull()
        {
            using (var context = new ElasticsearchContext(ConnectionString, _elasticsearchMappingResolver))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                var skillWithIntArray = new SkillWithIntArray {
                    BlahBlah = "test with no int array", Id = 3
                };
                context.AddUpdateDocument(skillWithIntArray, skillWithIntArray.Id);

                // Save to Elasticsearch
                var ret = context.SaveChanges();
                Assert.Equal(ret.Status, HttpStatusCode.OK);

                var returned = context.GetDocument <SkillWithIntArray>(3);
                Assert.Equal(skillWithIntArray.BlahBlah, returned.BlahBlah);
                Assert.Null(returned.MyIntArray);
            }
        }
        public void TestDefaultContextParentNestedIntArray()
        {
            using (var context = new ElasticsearchContext(ConnectionString, _elasticsearchMappingResolver))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                var skillWithIntArray = new SkillWithIntArray
                {
                    MyIntArray = new[] { 2, 4, 6, 99, 7 },
                    BlahBlah = "test3 with int array",
                    Id = 2
                };
                context.AddUpdateDocument(skillWithIntArray, skillWithIntArray.Id);

                // Save to Elasticsearch
                var ret = context.SaveChanges();
                Assert.AreEqual(ret.Status, HttpStatusCode.OK);

                var returned = context.GetDocument<SkillWithIntArray>(2);
                Assert.AreEqual(skillWithIntArray.MyIntArray[2], returned.MyIntArray[2]);
            }
        }
        public void TestDefaultContextParentNestedIntArray()
        {
            using (var context = new ElasticsearchContext(ConnectionString, _elasticsearchMappingResolver))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                var skillWithIntArray = new SkillWithIntArray
                {
                    MyIntArray = new[] { 2, 4, 6, 99, 7 },
                    BlahBlah   = "test3 with int array",
                    Id         = 2
                };
                context.AddUpdateDocument(skillWithIntArray, skillWithIntArray.Id);

                // Save to Elasticsearch
                var ret = context.SaveChanges();
                Assert.AreEqual(ret.Status, HttpStatusCode.OK);

                var returned = context.GetDocument <SkillWithIntArray>(2);
                Assert.AreEqual(skillWithIntArray.MyIntArray[2], returned.MyIntArray[2]);
            }
        }
        public void TestDefaultContextParentNestedIntArrayEqualsNull()
        {
            using (var context = new ElasticsearchContext(ConnectionString, _elasticsearchMappingResolver))
            {
                context.TraceProvider = new ConsoleTraceProvider();
                var skillWithIntArray = new SkillWithIntArray { BlahBlah = "test with no int array", Id = 3 };
                context.AddUpdateDocument(skillWithIntArray, skillWithIntArray.Id);

                // Save to Elasticsearch
                var ret = context.SaveChanges();
                Assert.AreEqual(ret.Status, HttpStatusCode.OK);

                var returned = context.GetDocument<SkillWithIntArray>(3);
                Assert.AreEqual(skillWithIntArray.BlahBlah, returned.BlahBlah, "Round Trip not the same");
                Assert.IsNull(returned.MyIntArray);
            }
        }