Skip to content

Commit 11cbbee

Browse files
committed
Add test in attempt to reproduce #732
1 parent 6a9603a commit 11cbbee

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
<Compile Include="Reproduce\Reproduce654Tests.cs" />
181181
<Compile Include="Reproduce\Reproduce659Tests.cs" />
182182
<Compile Include="Reproduce\Reproduce730Tests.cs" />
183+
<Compile Include="Reproduce\Reproduce732Tests.cs" />
183184
<Compile Include="Reproduce\ReproduceConnectionStallsTests.cs" />
184185
<Compile Include="Search\FieldTests\FieldsTest.cs" />
185186
<Compile Include="Search\NamedFilter\NamedFilterTests.cs" />
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using Nest.Tests.MockData;
2+
using Nest.Tests.MockData.Domain;
3+
using NUnit.Framework;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
10+
namespace Nest.Tests.Integration.Reproduce
11+
{
12+
[TestFixture]
13+
public class Reproduce732Tests : IntegrationTests
14+
{
15+
[Test]
16+
public void UpdateUsingDynamicObject()
17+
{
18+
var id = NestTestData.Data.Last().Id;
19+
var project = this._client.Source<ElasticsearchProject>(s => s.Id(id));
20+
Assert.NotNull(project);
21+
var loc = project.LOC;
22+
this._client.Update<ElasticsearchProject, dynamic>(u => u
23+
.Id(id)
24+
.Document(new
25+
{
26+
Id = project.Id,
27+
LOC = project.LOC + 10
28+
})
29+
.Refresh()
30+
);
31+
project = this._client.Source<ElasticsearchProject>(s => s.Id(id));
32+
Assert.AreEqual(project.LOC, loc + 10);
33+
Assert.AreNotEqual(project.Version, "1");
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)