Skip to content

Commit d2e7d24

Browse files
Bump Mongo client to v3, update DicomTypeTranslation (#2006)
* Bump Mongo client to v3, add explicit hostname for lone Mongo cluster member to avoid DNS issues * Update MongoExtractJobStoreTest.cs Reset test extraction DB for each unit test * Update MongoExtractJobStoreTest.cs Reset MockSessionHandle each unit test too * Update MongoExtractJobStoreTest.cs Reset mock doc store when resetting mock Mongo client * Try updating HIC.DicomTypeTranslation * Update lock files * Remove transitive fo-dicom version override * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent d41ce76 commit d2e7d24

File tree

20 files changed

+337
-525
lines changed

20 files changed

+337
-525
lines changed

Directory.Packages.props

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
99
<PackageVersion Include="CsvHelper" Version="33.0.1" />
1010
<PackageVersion Include="Equ" Version="2.3.0" />
11-
<PackageVersion Include="HIC.DicomTypeTranslation" Version="4.1.3" />
11+
<PackageVersion Include="fo-dicom" Version="5.1.4" />
12+
<PackageVersion Include="fo-dicom.Imaging.ImageSharp" Version="5.1.4" />
13+
<PackageVersion Include="HIC.DicomTypeTranslation" Version="4.1.5" />
1214
<PackageVersion Include="HIC.FAnsiSql" Version="3.2.7" />
1315
<PackageVersion Include="HIC.RDMP.Dicom" Version="7.1.0" />
1416
<PackageVersion Include="HIC.RDMP.Plugin" Version="8.3.0" />
@@ -17,8 +19,8 @@
1719
<PackageVersion Include="LineReader" Version="0.1.0" />
1820
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.11.0" />
1921
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
20-
<PackageVersion Include="MongoDB.Bson" Version="2.30.0" />
21-
<PackageVersion Include="MongoDB.Driver" Version="2.30.0" />
22+
<PackageVersion Include="MongoDB.Bson" Version="3.0.0" />
23+
<PackageVersion Include="MongoDB.Driver" Version="3.0.0" />
2224
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
2325
<PackageVersion Include="NLog" Version="5.3.4" />
2426
<PackageVersion Include="RabbitMQ.Client" Version="6.8.1" />

SmiServices.sln

+2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
88
CHANGELOG.md = CHANGELOG.md
99
docs\DataLoading.md = docs\DataLoading.md
1010
data\microserviceConfigs\default.yaml = data\microserviceConfigs\default.yaml
11+
.github\dependabot.yml = .github\dependabot.yml
1112
Directory.Build.props = Directory.Build.props
1213
global.json = global.json
1314
Glossary.md = Glossary.md
1415
PACKAGES.md = PACKAGES.md
16+
.github\PULL_REQUEST_TEMPLATE.md = .github\PULL_REQUEST_TEMPLATE.md
1517
README.md = README.md
1618
SharedAssemblyInfo.cs = SharedAssemblyInfo.cs
1719
data\logging\Smi.NLog.config = data\logging\Smi.NLog.config

bin/smi/startDockerLinux.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def main() -> int:
4242
cmd = (
4343
docker, "exec",
4444
"mongodb",
45-
"/usr/bin/mongo", "--eval", "rs.initiate()",
45+
"/usr/bin/mongo", "--eval", 'rs.initiate({_id:"rs0",members:[{_id:0,host:"localhost:27017"}]})',
4646
)
4747
C.run(cmd)
4848

src/SmiServices/packages.lock.json

+63-110
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
},
2323
"HIC.DicomTypeTranslation": {
2424
"type": "Direct",
25-
"requested": "[4.1.3, )",
26-
"resolved": "4.1.3",
27-
"contentHash": "Sbr7iijnajCjeHHXIAlM7nV4z69F6lEA2EGS4ZtvM9h+DYvZSysnLRWNiO3lNOnWqhx7Gl5z3bPGxVBz6J6YBQ==",
25+
"requested": "[4.1.5, )",
26+
"resolved": "4.1.5",
27+
"contentHash": "w6mcvJLkl4l3/FbbyXAATQwttko8BKT2WPsiYHM6KKBjlAlJusjxDBXiEbAcF0ybi0QeDrEt6Y8K6GvipW/XjA==",
2828
"dependencies": {
29-
"HIC.FAnsiSql": "3.2.6",
30-
"MongoDB.Driver": "2.28.0",
31-
"NLog": "5.3.2",
29+
"HIC.FAnsiSql": "3.2.7",
30+
"MongoDB.Driver": "3.0.0",
31+
"NLog": "5.3.4",
3232
"Newtonsoft.Json": "13.0.3",
33-
"YamlDotNet": "16.0.0",
34-
"fo-dicom": "5.1.3"
33+
"YamlDotNet": "16.1.3",
34+
"fo-dicom": "5.1.4"
3535
}
3636
},
3737
"HIC.FAnsiSql": {
@@ -152,24 +152,27 @@
152152
},
153153
"MongoDB.Bson": {
154154
"type": "Direct",
155-
"requested": "[2.30.0, )",
156-
"resolved": "2.30.0",
157-
"contentHash": "Gg0TQUT3IEntcqdug5a9P6d8iwL5CqOpQjVBCq1hxTbkjxdGdY6a2CPv7II44AO9GYUnORYsS6dDME2b7aqYyg==",
155+
"requested": "[3.0.0, )",
156+
"resolved": "3.0.0",
157+
"contentHash": "qnPRJ58HXDh7C4oxTf6YB7BJhlCGJIa6TMXhzImw6zk44lrAomQXTB6AtoQ5lNJbkyrgQcT7+smsKFMnXmLXhw==",
158158
"dependencies": {
159159
"System.Memory": "4.5.5",
160160
"System.Runtime.CompilerServices.Unsafe": "5.0.0"
161161
}
162162
},
163163
"MongoDB.Driver": {
164164
"type": "Direct",
165-
"requested": "[2.30.0, )",
166-
"resolved": "2.30.0",
167-
"contentHash": "BCG8cNF0+U3h5f/O9fu3ktrYhoESBDems1w06PExfYrn2KjHBHCBdvBRY1cIbysnZVjQAJjGtFV9XgW+hXt7Hg==",
165+
"requested": "[3.0.0, )",
166+
"resolved": "3.0.0",
167+
"contentHash": "udcP8rOhyuhLDn3sGVdNUgQSXfKGPaIP4w09XVKf4xdy66YSXinhkIuQSuOeZVHdTFsG2PpUbRx2wyFm7E0EMg==",
168168
"dependencies": {
169+
"DnsClient": "1.6.1",
169170
"Microsoft.Extensions.Logging.Abstractions": "2.0.0",
170-
"MongoDB.Bson": "2.30.0",
171-
"MongoDB.Driver.Core": "2.30.0",
172-
"MongoDB.Libmongocrypt": "1.12.0"
171+
"MongoDB.Bson": "3.0.0",
172+
"SharpCompress": "0.30.1",
173+
"Snappier": "1.0.0",
174+
"System.Buffers": "4.5.1",
175+
"ZstdSharp.Port": "0.7.3"
173176
}
174177
},
175178
"Newtonsoft.Json": {
@@ -293,8 +296,8 @@
293296
},
294297
"CommunityToolkit.HighPerformance": {
295298
"type": "Transitive",
296-
"resolved": "8.2.2",
297-
"contentHash": "+zIp8d3sbtYaRbM6hqDs4Ui/z34j7DcUmleruZlYLE4CVxXq+MO8XJyIs42vzeTYFX+k0Iq1dEbBUnQ4z/Gnrw=="
299+
"resolved": "8.3.2",
300+
"contentHash": "1Os81ua0FmIOtiSgOk5C1KBraQ3SDfxs/7BG4qDagm48nGplr//lAVqLH9I2TLDVqRFdhqTUaEITFA5Ho/Ovkw=="
298301
},
299302
"DnsClient": {
300303
"type": "Transitive",
@@ -324,33 +327,6 @@
324327
"resolved": "51.1.0",
325328
"contentHash": "Vm3eGvHACns0zsKfCMCZdZSFKYu2ajV/GeRk4vfgy6d5AR+WqSUjaSWbbhkmS01A8OMjZHFLduPH7nxwGvlcpQ=="
326329
},
327-
"fo-dicom": {
328-
"type": "Transitive",
329-
"resolved": "5.1.3",
330-
"contentHash": "MOV8novKkhcXa/vURDNwlXC387ZzOflTpAnp2Filn3c355T63jDGVF0WHg0ar3QBKl8efDBrzkX/l+vhsHmpMg==",
331-
"dependencies": {
332-
"CommunityToolkit.HighPerformance": "8.2.2",
333-
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
334-
"Microsoft.Bcl.HashCode": "1.1.1",
335-
"Microsoft.Extensions.DependencyInjection": "6.0.1",
336-
"Microsoft.Extensions.Logging": "6.0.0",
337-
"Microsoft.Extensions.Options": "6.0.0",
338-
"System.Buffers": "4.5.1",
339-
"System.Text.Encoding.CodePages": "6.0.0",
340-
"System.Text.Encodings.Web": "6.0.0",
341-
"System.Text.Json": "6.0.9",
342-
"System.Threading.Channels": "6.0.0"
343-
}
344-
},
345-
"fo-dicom.Imaging.ImageSharp": {
346-
"type": "Transitive",
347-
"resolved": "5.1.3",
348-
"contentHash": "nKpcbSfYNN9emzm3Q3NpWGxM5v8Eww3lvM7vWd9a+AmgKy8TtmcbHuZSPYqd6aMnTibEErXhDPkjts+fzbvYMQ==",
349-
"dependencies": {
350-
"SixLabors.ImageSharp": "3.1.4",
351-
"fo-dicom": "5.1.3"
352-
}
353-
},
354330
"HIC.SynthEHR": {
355331
"type": "Transitive",
356332
"resolved": "2.0.1",
@@ -389,8 +365,8 @@
389365
},
390366
"Microsoft.Bcl.AsyncInterfaces": {
391367
"type": "Transitive",
392-
"resolved": "6.0.0",
393-
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
368+
"resolved": "8.0.0",
369+
"contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw=="
394370
},
395371
"Microsoft.Bcl.HashCode": {
396372
"type": "Transitive",
@@ -615,27 +591,6 @@
615591
"System.Security.Principal.Windows": "5.0.0"
616592
}
617593
},
618-
"MongoDB.Driver.Core": {
619-
"type": "Transitive",
620-
"resolved": "2.30.0",
621-
"contentHash": "oepDgu24lo44SljuHmIQ99x6jHISnMC4tLfzQGniQg39xiMD8nxalm1HM9RDZcuZbbWa4F6YLt2AIhWkny3XWA==",
622-
"dependencies": {
623-
"AWSSDK.SecurityToken": "3.7.100.14",
624-
"DnsClient": "1.6.1",
625-
"Microsoft.Extensions.Logging.Abstractions": "2.0.0",
626-
"MongoDB.Bson": "2.30.0",
627-
"MongoDB.Libmongocrypt": "1.12.0",
628-
"SharpCompress": "0.30.1",
629-
"Snappier": "1.0.0",
630-
"System.Buffers": "4.5.1",
631-
"ZstdSharp.Port": "0.7.3"
632-
}
633-
},
634-
"MongoDB.Libmongocrypt": {
635-
"type": "Transitive",
636-
"resolved": "1.12.0",
637-
"contentHash": "B1X51jrtNacKvxKoaqWeknYeJfQS5aWf6BmVLT5JZerz3AUXFzv8edPskJYqBc3kLy1J2PWzMqqsnyb9g8FtcA=="
638-
},
639594
"MySqlConnector": {
640595
"type": "Transitive",
641596
"resolved": "2.3.7",
@@ -968,20 +923,13 @@
968923
},
969924
"System.Text.Encodings.Web": {
970925
"type": "Transitive",
971-
"resolved": "6.0.0",
972-
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
973-
"dependencies": {
974-
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
975-
}
926+
"resolved": "8.0.0",
927+
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ=="
976928
},
977929
"System.Text.Json": {
978930
"type": "Transitive",
979-
"resolved": "6.0.9",
980-
"contentHash": "2j16oUgtIzl7Xtk7demG0i/v5aU/ZvULcAnJvPb63U3ZhXJ494UYcxuEj5Fs49i3XDrk5kU/8I+6l9zRCw3cJw==",
981-
"dependencies": {
982-
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
983-
"System.Text.Encodings.Web": "6.0.0"
984-
}
931+
"resolved": "8.0.5",
932+
"contentHash": "0f1B50Ss7rqxXiaBJyzUu9bWFOO2/zSlifZ/UNMdiIpDYe4cY4LQQicP4nirK1OS31I43rn062UIJ1Q9bpmHpg=="
985933
},
986934
"System.Threading.Channels": {
987935
"type": "Transitive",
@@ -1026,6 +974,35 @@
1026974
"resolved": "0.7.3",
1027975
"contentHash": "U9Ix4l4cl58Kzz1rJzj5hoVTjmbx1qGMwzAcbv1j/d3NzrFaESIurQyg+ow4mivCgkE3S413y+U9k4WdnEIkRA=="
1028976
},
977+
"fo-dicom": {
978+
"type": "CentralTransitive",
979+
"requested": "[5.1.4, )",
980+
"resolved": "5.1.4",
981+
"contentHash": "9tnbXaMmCu2FRM47TbYBwVo02pr2+7O5cPGcmLGVbdTH2hbe2AYgh6ce44zgjWJh0XDpLng8UM6OQbgqfzd9Fg==",
982+
"dependencies": {
983+
"CommunityToolkit.HighPerformance": "8.3.2",
984+
"Microsoft.Bcl.AsyncInterfaces": "8.0.0",
985+
"Microsoft.Bcl.HashCode": "1.1.1",
986+
"Microsoft.Extensions.DependencyInjection": "6.0.1",
987+
"Microsoft.Extensions.Logging": "6.0.0",
988+
"Microsoft.Extensions.Options": "6.0.0",
989+
"System.Buffers": "4.5.1",
990+
"System.Text.Encoding.CodePages": "6.0.0",
991+
"System.Text.Encodings.Web": "8.0.0",
992+
"System.Text.Json": "8.0.5",
993+
"System.Threading.Channels": "6.0.0"
994+
}
995+
},
996+
"fo-dicom.Imaging.ImageSharp": {
997+
"type": "CentralTransitive",
998+
"requested": "[5.1.4, )",
999+
"resolved": "5.1.3",
1000+
"contentHash": "nKpcbSfYNN9emzm3Q3NpWGxM5v8Eww3lvM7vWd9a+AmgKy8TtmcbHuZSPYqd6aMnTibEErXhDPkjts+fzbvYMQ==",
1001+
"dependencies": {
1002+
"SixLabors.ImageSharp": "3.1.4",
1003+
"fo-dicom": "5.1.3"
1004+
}
1005+
},
10291006
"Spectre.Console": {
10301007
"type": "CentralTransitive",
10311008
"requested": "[0.49.1, )",
@@ -1097,11 +1074,6 @@
10971074
"System.Security.Principal.Windows": "5.0.0"
10981075
}
10991076
},
1100-
"MongoDB.Libmongocrypt": {
1101-
"type": "Transitive",
1102-
"resolved": "1.12.0",
1103-
"contentHash": "B1X51jrtNacKvxKoaqWeknYeJfQS5aWf6BmVLT5JZerz3AUXFzv8edPskJYqBc3kLy1J2PWzMqqsnyb9g8FtcA=="
1104-
},
11051077
"runtime.any.System.Collections": {
11061078
"type": "Transitive",
11071079
"resolved": "4.3.0",
@@ -1521,11 +1493,8 @@
15211493
},
15221494
"System.Text.Encodings.Web": {
15231495
"type": "Transitive",
1524-
"resolved": "6.0.0",
1525-
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
1526-
"dependencies": {
1527-
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
1528-
}
1496+
"resolved": "8.0.0",
1497+
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ=="
15291498
},
15301499
"System.Threading": {
15311500
"type": "Transitive",
@@ -1603,11 +1572,6 @@
16031572
"System.Security.Principal.Windows": "5.0.0"
16041573
}
16051574
},
1606-
"MongoDB.Libmongocrypt": {
1607-
"type": "Transitive",
1608-
"resolved": "1.12.0",
1609-
"contentHash": "B1X51jrtNacKvxKoaqWeknYeJfQS5aWf6BmVLT5JZerz3AUXFzv8edPskJYqBc3kLy1J2PWzMqqsnyb9g8FtcA=="
1610-
},
16111575
"runtime.any.System.Collections": {
16121576
"type": "Transitive",
16131577
"resolved": "4.3.0",
@@ -2027,11 +1991,8 @@
20271991
},
20281992
"System.Text.Encodings.Web": {
20291993
"type": "Transitive",
2030-
"resolved": "6.0.0",
2031-
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
2032-
"dependencies": {
2033-
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
2034-
}
1994+
"resolved": "8.0.0",
1995+
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ=="
20351996
},
20361997
"System.Threading": {
20371998
"type": "Transitive",
@@ -2109,11 +2070,6 @@
21092070
"System.Security.Principal.Windows": "5.0.0"
21102071
}
21112072
},
2112-
"MongoDB.Libmongocrypt": {
2113-
"type": "Transitive",
2114-
"resolved": "1.12.0",
2115-
"contentHash": "B1X51jrtNacKvxKoaqWeknYeJfQS5aWf6BmVLT5JZerz3AUXFzv8edPskJYqBc3kLy1J2PWzMqqsnyb9g8FtcA=="
2116-
},
21172073
"runtime.any.System.Collections": {
21182074
"type": "Transitive",
21192075
"resolved": "4.3.0",
@@ -2443,11 +2399,8 @@
24432399
},
24442400
"System.Text.Encodings.Web": {
24452401
"type": "Transitive",
2446-
"resolved": "6.0.0",
2447-
"contentHash": "Vg8eB5Tawm1IFqj4TVK1czJX89rhFxJo9ELqc/Eiq0eXy13RK00eubyU6TJE6y+GQXjyV5gSfiewDUZjQgSE0w==",
2448-
"dependencies": {
2449-
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
2450-
}
2402+
"resolved": "8.0.0",
2403+
"contentHash": "yev/k9GHAEGx2Rg3/tU6MQh4HGBXJs70y7j1LaM1i/ER9po+6nnQ6RRqTJn1E7Xu0fbIFK80Nh5EoODxrbxwBQ=="
24512404
},
24522405
"System.Threading": {
24532406
"type": "Transitive",

tests/SmiServices.IntegrationTests/Applications/TriggerUpdates/MapperSourceIntegrationTest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public void MapperSource_IntegrationTest(DatabaseType dbType)
8383
Assert.That(guidTable?.GetRowCount(), Is.EqualTo(0), "No temporary guids should exist yet");
8484
Assert.That(map.GetRowCount(), Is.EqualTo(1), "We should have a mapping table with 1 entry");
8585
});
86+
if (guidTable is null) return; // We've actually failed and aborted already at this point, but the compiler doesn't know that
8687

8788
guidTable.Insert(new Dictionary<string, object>
8889
{

tests/SmiServices.IntegrationTests/Common/Messaging/RabbitMQBrokerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public void SetupProducer_InvalidBackoffProvider_Throws()
311311
// Act
312312
// Assert
313313
var exc = Assert.Throws<ArgumentException>(() => broker.SetupProducer(producerOptions));
314-
Assert.That(exc.Message, Is.EqualTo("Could not parse 'Foo' to a valid BackoffProviderType"));
314+
Assert.That(exc?.Message, Is.EqualTo("Could not parse 'Foo' to a valid BackoffProviderType"));
315315
}
316316

317317
[Test]

tests/SmiServices.IntegrationTests/Common/OptionsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void GlobalOptionsFactory_Load_EmptyFile_ThrowsWithUsefulMessage()
9292
var globalOptionsFactory = new GlobalOptionsFactory();
9393

9494
var exc = Assert.Throws<Exception>(() => globalOptionsFactory.Load(nameof(GlobalOptionsFactory_Load_EmptyFile_ThrowsWithUsefulMessage), "foo.yaml", fileSystem));
95-
Assert.That(exc.Message, Is.EqualTo("Did not deserialize a GlobalOptions object from the provided YAML file. Does it contain at least one valid key?"));
95+
Assert.That(exc?.Message, Is.EqualTo("Did not deserialize a GlobalOptions object from the provided YAML file. Does it contain at least one valid key?"));
9696
}
9797

9898
[Test]
@@ -102,7 +102,7 @@ public void GlobalOptionsFactory_Load_MissingFile_ThrowsWithUsefulMessage()
102102
var globalOptionsFactory = new GlobalOptionsFactory();
103103

104104
var exc = Assert.Throws<ArgumentException>(() => globalOptionsFactory.Load(nameof(GlobalOptionsFactory_Load_EmptyFile_ThrowsWithUsefulMessage), "foo.yaml", fileSystem));
105-
Assert.That(exc.Message, Is.EqualTo("Could not find config file 'foo.yaml'"));
105+
Assert.That(exc?.Message, Is.EqualTo("Could not find config file 'foo.yaml'"));
106106
}
107107
}
108108
}

tests/SmiServices.IntegrationTests/Microservices/IdentifierMapper/TableLookupWithGuidFallbackSwapperTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ public void Test_Cache1Hit1Miss(DatabaseType dbType)
9090
{
9191
Assert.That(swapper.GetSubstitutionFor("0202020202", out reason), Is.EqualTo(answer2));
9292

93-
Assert.That(guidTable.GetRowCount(), Is.EqualTo(1));
94-
Assert.That(guidTable.GetDataTable().Rows[0]["CHI"], Is.EqualTo("0202020202"));
95-
Assert.That(guidTable.GetDataTable().Rows[0]["guid"], Is.EqualTo(answer2));
93+
Assert.That(guidTable?.GetRowCount(), Is.EqualTo(1));
94+
Assert.That(guidTable?.GetDataTable().Rows[0]["CHI"], Is.EqualTo("0202020202"));
95+
Assert.That(guidTable?.GetDataTable().Rows[0]["guid"], Is.EqualTo(answer2));
9696
});
9797

9898

tests/SmiServices.IntegrationTests/Microservices/UpdateValues/TestUpdateDatabase.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void Test_WhereField_NotFound()
150150

151151
TestContext.Out.WriteLine(ex?.Message);
152152

153-
Assert.That(ex.Message, Is.EqualTo("Could not find any tables to update that matched the field set UpdateValuesMessage: WhereFields=Blarg WriteIntoFields=PatientID"));
153+
Assert.That(ex?.Message, Is.EqualTo("Could not find any tables to update that matched the field set UpdateValuesMessage: WhereFields=Blarg WriteIntoFields=PatientID"));
154154
}
155155

156156
[Test]
@@ -171,7 +171,7 @@ public void Test_WriteIntoFields_NotFound()
171171

172172
TestContext.Out.WriteLine(ex?.Message);
173173

174-
Assert.That(ex.Message, Is.EqualTo("Could not find any tables to update that matched the field set UpdateValuesMessage: WhereFields=PatientID WriteIntoFields=Blarg"));
174+
Assert.That(ex?.Message, Is.EqualTo("Could not find any tables to update that matched the field set UpdateValuesMessage: WhereFields=PatientID WriteIntoFields=Blarg"));
175175
}
176176

177177

0 commit comments

Comments
 (0)