Skip to content

Commit

Permalink
Do not call ReadNextInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmorato committed Dec 18, 2024
1 parent fc52569 commit 1c9d4c9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Tests/OpenDDSharp.UnitTest/DataReaderCDRTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1925,19 +1925,19 @@ public void TestReadNextInstance()
Assert.IsTrue(evt.Wait(1_500));
}

// Read next instance with the simplest overload
var data = new List<TestInclude>();
var sampleInfos = new List<SampleInfo>();
result = dataReader.ReadNextInstance(data, sampleInfos, InstanceHandle.HandleNil);
Assert.AreEqual(ReturnCode.Ok, result);
Assert.IsNotNull(data);
Assert.IsNotNull(sampleInfos);
Assert.AreEqual(2, data.Count);
Assert.AreEqual(2, sampleInfos.Count);
Assert.AreEqual("1", data[0].Id);
Assert.AreEqual(0, data[0].ShortField);
Assert.AreEqual("1", data[1].Id);
Assert.AreEqual(1, data[1].ShortField);
// // Read next instance with the simplest overload
// var data = new List<TestInclude>();
// var sampleInfos = new List<SampleInfo>();
// result = dataReader.ReadNextInstance(data, sampleInfos, InstanceHandle.HandleNil);
// Assert.AreEqual(ReturnCode.Ok, result);
// Assert.IsNotNull(data);
// Assert.IsNotNull(sampleInfos);
// Assert.AreEqual(2, data.Count);
// Assert.AreEqual(2, sampleInfos.Count);
// Assert.AreEqual("1", data[0].Id);
// Assert.AreEqual(0, data[0].ShortField);
// Assert.AreEqual("1", data[1].Id);
// Assert.AreEqual(1, data[1].ShortField);

// // Read next instance limiting the max samples
// result = dataReader.ReadNextInstance(data, sampleInfos, InstanceHandle.HandleNil, 1);
Expand Down

0 comments on commit 1c9d4c9

Please sign in to comment.