Skip to content

Commit

Permalink
Add a test if the app name has locale == null (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
mregen committed Sep 13, 2021
1 parent 76afe82 commit 3c7e633
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/Opc.Ua.Gds.Tests/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private ApplicationTestData RandomApplicationTestData()
string appName = "UA " + pureAppName;
StringCollection domainNames = RandomDomainNames();
string localhost = domainNames[0];
string locale = _randomSource.NextInt32(10) == 0 ? null : "en-US";
string privateKeyFormat = _randomSource.NextInt32(1) == 0 ? "PEM" : "PFX";
string appUri = ("urn:localhost:opcfoundation.org:" + pureAppUri.ToLower()).Replace("localhost", localhost);
string prodUri = "http://opcfoundation.org/UA/" + pureAppUri;
Expand Down Expand Up @@ -135,7 +136,7 @@ private ApplicationTestData RandomApplicationTestData()
}
ApplicationTestData testData = new ApplicationTestData {
ApplicationRecord = new ApplicationRecordDataType {
ApplicationNames = new LocalizedTextCollection { new LocalizedText("en-us", appName) },
ApplicationNames = new LocalizedTextCollection { new LocalizedText(locale, appName) },
ApplicationUri = appUri,
ApplicationType = appType,
ProductUri = prodUri,
Expand Down

0 comments on commit 3c7e633

Please sign in to comment.