standard_namespace_ut.cpp
Go to the documentation of this file.
1 
14 
17 
18 #include <functional>
19 #include <gmock/gmock.h>
20 #include <gtest/gtest.h>
21 
22 using namespace testing;
23 using namespace OpcUa;
24 
25 
26 static Server::AddressSpace::SharedPtr NameSpace;
27 
28 
30 {
31 protected:
32  virtual void SetUp()
33  {
35  Logger = spdlog::stderr_color_mt("test");
36  Logger->set_level(spdlog::level::info);
37 
38  if (!NameSpace)
39  {
42  }
43  }
44 
45  virtual void TearDown()
46  {
47 // NameSpace.reset();
48  }
49 
50 protected:
51  std::vector<ReferenceDescription> Browse(const NodeId & id) const
52  {
54  description.NodeToBrowse = id;
55  OpcUa::NodesQuery query;
56  query.NodesToBrowse.push_back(description);
57  auto result = NameSpace->Browse(query);
58 
59  if (result.empty())
60  {
61  return std::vector<ReferenceDescription>();
62  }
63 
64  return result[0].Referencies;
65  }
66 
67  bool HasReference(std::vector<ReferenceDescription> refs, ReferenceId referenceId, NodeId targetNode) const
68  {
69  for (const ReferenceDescription ref : refs)
70  {
71  if (ref.TargetNodeId == targetNode && ref.ReferenceTypeId == referenceId)
72  {
73  return true;
74  }
75  }
76 
77  return false;
78  }
79 
81  {
82  ReadParameters params;
83  ReadValueId id;
84  id.NodeId = object;
85  id.AttributeId = attribute;
86  params.AttributesToRead.push_back(id);
87  std::vector<DataValue> values = NameSpace->Read(params);
88  return values.size() == 1 && values[0].Status == StatusCode::Good;
89  }
90 
92  {
93  EXPECT_TRUE(HasAttribute(id, AttributeId::NodeId));
94  EXPECT_TRUE(HasAttribute(id, AttributeId::NodeClass));
95  EXPECT_TRUE(HasAttribute(id, AttributeId::BrowseName));
96  EXPECT_TRUE(HasAttribute(id, AttributeId::DisplayName));
97  EXPECT_TRUE(HasAttribute(id, AttributeId::Description));
98  EXPECT_TRUE(HasAttribute(id, AttributeId::WriteMask));
99  EXPECT_TRUE(HasAttribute(id, AttributeId::UserWriteMask));
100  }
101 
103  {
104  EXPECT_TRUE(HasAttribute(id, AttributeId::EventNotifier));
105  }
106 
108  {
109  EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
110  }
111 
113  {
114  EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
115  }
116 
118  {
119  EXPECT_TRUE(HasAttribute(id, AttributeId::Value));
120  EXPECT_TRUE(HasAttribute(id, AttributeId::DataType));
121  EXPECT_TRUE(HasAttribute(id, AttributeId::ValueRank));
122  EXPECT_TRUE(HasAttribute(id, AttributeId::ArrayDimensions));
123  EXPECT_TRUE(HasAttribute(id, AttributeId::AccessLevel));
124  EXPECT_TRUE(HasAttribute(id, AttributeId::UserAccessLevel));
126  EXPECT_TRUE(HasAttribute(id, AttributeId::Historizing));
127  }
128 
130  {
131  EXPECT_TRUE(HasAttribute(id, AttributeId::Value));
132  EXPECT_TRUE(HasAttribute(id, AttributeId::DataType));
133  EXPECT_TRUE(HasAttribute(id, AttributeId::ValueRank));
134  EXPECT_TRUE(HasAttribute(id, AttributeId::ArrayDimensions));
135  EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
136  }
137 
139  {
140  ExpectHasBaseAttributes(id);
141  ExpectHasTypeAttributes(id);
142  EXPECT_TRUE(HasAttribute(id, AttributeId::Symmetric));
143  }
144 
145 private:
146  Common::Logger::SharedPtr Logger;
147 };
148 
149 template <typename T>
150 std::size_t SizeOf(std::vector<T> vec)
151 {
152  return vec.size();
153 }
154 
155 template <typename T>
156 inline NodeId Node(T value)
157 {
158  return NodeId(value);
159 }
160 
161 TEST_F(StandardNamespaceStructure, CanBrowseRootFolder_By_Organizes_RefType)
162 {
164  description.NodeToBrowse = ObjectId::RootFolder;
165  description.Direction = BrowseDirection::Forward;
167  description.IncludeSubtypes = true;
168  description.NodeClasses = NodeClass::Object;
169  description.ResultMask = BrowseResultMask::All;
170 
171  OpcUa::NodesQuery query;
172  query.NodesToBrowse.push_back(description);
173  std::vector<BrowseResult> results = NameSpace->Browse(query);
174  ASSERT_EQ(results.size(), 1);
175  ASSERT_EQ(results[0].Referencies.size(), 3);
176 }
177 
178 TEST_F(StandardNamespaceStructure, CanBrowseRootFolder_By_HierarchicalReferencies_Subtypes)
179 {
181  description.NodeToBrowse = ObjectId::RootFolder;
182  description.Direction = BrowseDirection::Forward;
184  description.IncludeSubtypes = true;
185  description.NodeClasses = NodeClass::Object;
186  description.ResultMask = BrowseResultMask::All;
187  OpcUa::NodesQuery query;
188  query.NodesToBrowse.push_back(description);
189  std::vector<BrowseResult> results = NameSpace->Browse(query);
190  ASSERT_EQ(results.size(), 1);
191  ASSERT_EQ(results[0].Referencies.size(), 3);
192 }
193 
195 {
196  const std::vector<ReferenceDescription> refs = Browse(ObjectId::RootFolder);
197  EXPECT_EQ(SizeOf(refs), 4);
198  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ObjectsFolder));
199  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::TypesFolder));
200  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ViewsFolder));
202 
203  ExpectHasBaseAttributes(ObjectId::RootFolder);
204 }
205 
207 {
208  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server);
210 
211  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerArray));
212  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_NamespaceArray));
213  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServiceLevel));
214  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus));
215  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerCapabilities));
216  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics));
217  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_VendorServerInfo));
218  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerRedundancy));
219 
220  ExpectHasBaseAttributes(ObjectId::Server);
221 }
222 
223 TEST_F(StandardNamespaceStructure, Server_ServerArray)
224 {
225  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerArray);
227 
228  ExpectHasBaseAttributes(ObjectId::Server_ServerArray);
229  ExpectHasVariableAttributes(ObjectId::Server_ServerArray);
230 }
231 
232 TEST_F(StandardNamespaceStructure, Server_NamespaceArray)
233 {
234  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_NamespaceArray);
236 
237  ExpectHasBaseAttributes(ObjectId::Server_NamespaceArray);
238  ExpectHasVariableAttributes(ObjectId::Server_NamespaceArray);
239 }
240 
241 TEST_F(StandardNamespaceStructure, Server_ServiceLevel)
242 {
243  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServiceLevel);
245 
246  ExpectHasBaseAttributes(ObjectId::Server_ServiceLevel);
247  ExpectHasVariableAttributes(ObjectId::Server_ServiceLevel);
248 }
249 
250 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities)
251 {
252  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities);
254 
255  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_ServerProfileArray));
256  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MinSupportedSampleRate));
257  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints));
258  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints));
259  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints));
260  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerCapabilities_ModellingRules));
261  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_SoftwareCertificates));
262 
263  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities);
264 }
265 
266 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_ServerProfileArray)
267 {
268  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_ServerProfileArray);
270 
271  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_ServerProfileArray);
272  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_ServerProfileArray);
273 }
274 
275 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MinSupportedSampleRate)
276 {
277  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
279 
280  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
281  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
282 }
283 
284 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxBrowseContinuationPoints)
285 {
286  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
288 
289  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
290  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
291 }
292 
293 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxQueryContinuationPoints)
294 {
295  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
297 
298  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
299  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
300 }
301 
302 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxHistoryContinuationPoints)
303 {
304  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
306 
307  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
308  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
309 }
310 
311 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_SoftwareCertificates)
312 {
313  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
315 
316  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
317  ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
318 }
319 
320 TEST_F(StandardNamespaceStructure, Server_ModellingRules)
321 {
322  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_ModellingRules);
324 
326  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ModellingRule_Mandatory));
327  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ModellingRule_MandatoryShared));
328  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ModellingRule_Optional));
329 
330  ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_ModellingRules);
331 }
332 
333 TEST_F(StandardNamespaceStructure, ModellingRule_ExposesItsArray)
334 {
335  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_ExposesItsArray);
337 
338  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_ExposesItsArray_NamingRule));
339 
340  ExpectHasBaseAttributes(ObjectId::ModellingRule_ExposesItsArray);
341 }
342 
343 TEST_F(StandardNamespaceStructure, ModellingRule_ExposesItsArray_NamingRule)
344 {
345  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
347 
348  ExpectHasBaseAttributes(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
349  ExpectHasVariableAttributes(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
350 }
351 
352 
353 TEST_F(StandardNamespaceStructure, ModellingRule_Mandatory)
354 {
355  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Mandatory);
357 
358  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_Mandatory_NamingRule));
359 
360  ExpectHasBaseAttributes(ObjectId::ModellingRule_Mandatory);
361 }
362 
363 TEST_F(StandardNamespaceStructure, ModellingRule_Mandatory_NamingRule)
364 {
365  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Mandatory_NamingRule);
367 
368  ExpectHasBaseAttributes(ObjectId::ModellingRule_Mandatory_NamingRule);
369  ExpectHasVariableAttributes(ObjectId::ModellingRule_Mandatory_NamingRule);
370 }
371 
372 TEST_F(StandardNamespaceStructure, ModellingRule_MandatoryShared)
373 {
374  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_MandatoryShared);
376 
377  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_MandatoryShared_NamingRule));
378 
379  ExpectHasBaseAttributes(ObjectId::ModellingRule_MandatoryShared);
380 }
381 
382 TEST_F(StandardNamespaceStructure, ModellingRule_MandatoryShared_NamingRule)
383 {
384  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_MandatoryShared_NamingRule);
386 
387  ExpectHasBaseAttributes(ObjectId::ModellingRule_MandatoryShared_NamingRule);
388  ExpectHasVariableAttributes(ObjectId::ModellingRule_MandatoryShared_NamingRule);
389 }
390 
391 TEST_F(StandardNamespaceStructure, ModellingRule_Optional)
392 {
393  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Optional);
395 
396  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_Optional_NamingRule));
397 
398  ExpectHasBaseAttributes(ObjectId::ModellingRule_Optional);
399 }
400 
401 TEST_F(StandardNamespaceStructure, ModellingRule_Optional_NamingRule)
402 {
403  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Optional_NamingRule);
405 
406  ExpectHasBaseAttributes(ObjectId::ModellingRule_Optional_NamingRule);
407  ExpectHasVariableAttributes(ObjectId::ModellingRule_Optional_NamingRule);
408 }
409 
410 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics)
411 {
412  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics);
414 
415  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerDiagnostics_EnabledFlag));
416  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray));
417  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary));
418  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary));
419  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray));
420 
421  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics);
422 }
423 
424 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_EnabledFlag)
425 {
426  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_EnabledFlag);
428 
429  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_EnabledFlag);
430  ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_EnabledFlag);
431 }
432 
433 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray)
434 {
435  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
437 
438  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
439  ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
440 }
441 
442 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SessionsDiagnosticsSummary)
443 {
444  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary);
445  EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SessionsDiagnosticsSummaryType));
446 
447  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary);
448 }
449 
450 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_ServerDiagnosticsSummary)
451 {
452  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
454 
455  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
456  ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
457 }
458 
459 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SubscriptionRateDiagnosticsArray)
460 {
461  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
463 
464  ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
465  ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
466 }
467 
468 TEST_F(StandardNamespaceStructure, Server_ServerRedundancy)
469 {
470  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerRedundancy);
472 
473  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerRedundancy_RedundancySupport));
474 
475  ExpectHasBaseAttributes(ObjectId::Server_ServerRedundancy);
476 }
477 
478 TEST_F(StandardNamespaceStructure, Server_ServerStatus)
479 {
480  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus);
482 
483  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo));
484  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_CurrentTime));
485  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_StartTime));
486  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_State));
487 
488  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus);
489  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus);
490 }
491 
493 {
494  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo);
496 
497  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_BuildDate));
498  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_BuildNumber));
499  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName));
500  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ProductName));
501  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ProductUri));
502  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion));
503 
504  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo);
505  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo);
506 }
507 
508 TEST_F(StandardNamespaceStructure, Server_BuildInfo_BuildDate)
509 {
510  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_BuildDate);
512 
513  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo);
514  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo);
515 }
516 
517 TEST_F(StandardNamespaceStructure, Server_BuildInfo_BuildNumber)
518 {
519  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
521 
522  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
523  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
524 }
525 
526 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ManufacturerName)
527 {
528  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
530 
531  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
532  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
533 }
534 
535 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ProductName)
536 {
537  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
539 
540  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
541  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
542 }
543 
544 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ProductUri)
545 {
546  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
548 
549  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
550  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
551 }
552 
553 TEST_F(StandardNamespaceStructure, Server_BuildInfo_SoftwareVersion)
554 {
555  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
557 
558  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
559  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
560 }
561 
562 TEST_F(StandardNamespaceStructure, Server_ServerStatus_CurrentTime)
563 {
564  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_CurrentTime);
566 
567  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_CurrentTime);
568  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_CurrentTime);
569 }
570 
571 TEST_F(StandardNamespaceStructure, Server_ServerStatus_StartTime)
572 {
573  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_StartTime);
575 
576  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_StartTime);
577  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_StartTime);
578 }
579 
580 TEST_F(StandardNamespaceStructure, Server_ServerStatus_State)
581 {
582  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_State);
584 
585  ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_State);
586  ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_State);
587 }
588 
589 TEST_F(StandardNamespaceStructure, Server_VendorServerInfo)
590 {
591  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_VendorServerInfo);
593 
594  ExpectHasBaseAttributes(ObjectId::Server_VendorServerInfo);
595 }
596 
598 {
599  const std::vector<ReferenceDescription> refs = Browse(ObjectId::TypesFolder);
600  EXPECT_EQ(SizeOf(refs), 6);
602  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::DataTypesFolder));
603  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::EventTypesFolder));
604  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ObjectTypesFolder));
605  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ReferenceTypesFolder));
606  EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::VariableTypesFolder));
607 
608  ExpectHasBaseAttributes(ObjectId::TypesFolder);
609 }
610 
612 {
613  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypesFolder);
614  EXPECT_EQ(SizeOf(refs), 4);
617 
618  ExpectHasBaseAttributes(ObjectId::DataTypesFolder);
619 }
620 
622 {
623  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseDataType);
624  EXPECT_EQ(SizeOf(refs), 16);
632  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Guid));
641 
642  ExpectHasBaseAttributes(ObjectId::BaseDataType);
643  ExpectHasTypeAttributes(ObjectId::BaseDataType);
644 }
645 
647 {
648  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Boolean);
649  EXPECT_EQ(SizeOf(refs), 0);
650 
651  ExpectHasBaseAttributes(ObjectId::Boolean);
652  ExpectHasTypeAttributes(ObjectId::Boolean);
653 }
654 
656 {
657  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ByteString);
658  EXPECT_EQ(SizeOf(refs), 3);
660 
661  ExpectHasBaseAttributes(ObjectId::ByteString);
662  ExpectHasTypeAttributes(ObjectId::ByteString);
663 }
664 
666 {
667  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Image);
668  EXPECT_EQ(SizeOf(refs), 4);
669  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageBMP));
670  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageGIF));
671  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageJPG));
672  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImagePNG));
673 
674  ExpectHasBaseAttributes(ObjectId::Image);
675  ExpectHasTypeAttributes(ObjectId::Image);
676 }
677 
679 {
680  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageBMP);
681  EXPECT_EQ(SizeOf(refs), 0);
682 
683  ExpectHasBaseAttributes(ObjectId::ImageBMP);
684  ExpectHasTypeAttributes(ObjectId::ImageBMP);
685 }
686 
688 {
689  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageGIF);
690  EXPECT_EQ(SizeOf(refs), 0);
691 
692  ExpectHasBaseAttributes(ObjectId::ImageGIF);
693  ExpectHasTypeAttributes(ObjectId::ImageGIF);
694 }
695 
697 {
698  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageJPG);
699  EXPECT_EQ(SizeOf(refs), 0);
700 
701  ExpectHasBaseAttributes(ObjectId::ImageJPG);
702  ExpectHasTypeAttributes(ObjectId::ImageJPG);
703 }
704 
706 {
707  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImagePNG);
708  EXPECT_EQ(SizeOf(refs), 0);
709 
710  ExpectHasBaseAttributes(ObjectId::ImagePNG);
711  ExpectHasTypeAttributes(ObjectId::ImagePNG);
712 }
713 
715 {
716  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DateTime);
717  EXPECT_EQ(SizeOf(refs), 2);
719 
720  ExpectHasBaseAttributes(ObjectId::DateTime);
721  ExpectHasTypeAttributes(ObjectId::DateTime);
722 }
723 
725 {
726  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UtcTime);
727  EXPECT_EQ(SizeOf(refs), 0);
728 
729  ExpectHasBaseAttributes(ObjectId::UtcTime);
730  ExpectHasTypeAttributes(ObjectId::UtcTime);
731 }
732 
734 {
735  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DiagnosticInfo);
736  EXPECT_EQ(SizeOf(refs), 0);
737 
738  ExpectHasBaseAttributes(ObjectId::DiagnosticInfo);
739  ExpectHasTypeAttributes(ObjectId::DiagnosticInfo);
740 }
741 
743 {
744  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Enumeration);
745  EXPECT_EQ(SizeOf(refs), 17);
752 
753  ExpectHasBaseAttributes(ObjectId::Enumeration);
754  ExpectHasTypeAttributes(ObjectId::Enumeration);
755 }
756 
758 {
759  const std::vector<ReferenceDescription> refs = Browse(ObjectId::IdType);
760  EXPECT_EQ(SizeOf(refs), 1);
761 
762  ExpectHasBaseAttributes(ObjectId::IdType);
763  ExpectHasTypeAttributes(ObjectId::IdType);
764 }
765 
767 {
768  const std::vector<ReferenceDescription> refs = Browse(ObjectId::MessageSecurityMode);
769  EXPECT_EQ(SizeOf(refs), 1);
770 
771  ExpectHasBaseAttributes(ObjectId::MessageSecurityMode);
772  ExpectHasTypeAttributes(ObjectId::MessageSecurityMode);
773 }
774 
776 {
777  const std::vector<ReferenceDescription> refs = Browse(ObjectId::NodeClass);
778  EXPECT_EQ(SizeOf(refs), 1);
779 
780  ExpectHasBaseAttributes(ObjectId::NodeClass);
781  ExpectHasTypeAttributes(ObjectId::NodeClass);
782 }
783 
785 {
786  const std::vector<ReferenceDescription> refs = Browse(ObjectId::RedundancySupport);
787  EXPECT_EQ(SizeOf(refs), 1);
788 
789  ExpectHasBaseAttributes(ObjectId::RedundancySupport);
790  ExpectHasTypeAttributes(ObjectId::RedundancySupport);
791 }
792 
794 {
795  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SecurityTokenRequestType);
796  EXPECT_EQ(SizeOf(refs), 1);
797 
798  ExpectHasBaseAttributes(ObjectId::SecurityTokenRequestType);
799  ExpectHasTypeAttributes(ObjectId::SecurityTokenRequestType);
800 }
801 
803 {
804  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerState);
805  EXPECT_EQ(SizeOf(refs), 1);
806 
807  ExpectHasBaseAttributes(ObjectId::ServerState);
808  ExpectHasTypeAttributes(ObjectId::ServerState);
809 }
810 
812 {
813  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ExpandedNodeId);
814  EXPECT_EQ(SizeOf(refs), 0);
815 
816  ExpectHasBaseAttributes(ObjectId::ExpandedNodeId);
817  ExpectHasTypeAttributes(ObjectId::ExpandedNodeId);
818 }
819 
821 {
822  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Guid);
823  EXPECT_EQ(SizeOf(refs), 0);
824 
825  ExpectHasBaseAttributes(ObjectId::Guid);
826  ExpectHasTypeAttributes(ObjectId::Guid);
827 }
828 
830 {
831  const std::vector<ReferenceDescription> refs = Browse(ObjectId::LocalizedText);
832  EXPECT_EQ(SizeOf(refs), 0);
833 
834  ExpectHasBaseAttributes(ObjectId::LocalizedText);
835  ExpectHasTypeAttributes(ObjectId::LocalizedText);
836 }
837 
839 {
840  const std::vector<ReferenceDescription> refs = Browse(ObjectId::NodeId);
841  EXPECT_EQ(SizeOf(refs), 1);
842 
843  ExpectHasBaseAttributes(ObjectId::NodeId);
844  ExpectHasTypeAttributes(ObjectId::NodeId);
845 }
846 
848 {
849  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Number);
850  EXPECT_EQ(SizeOf(refs), 4);
854  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UInteger));
855 
856  ExpectHasBaseAttributes(ObjectId::Number);
857  ExpectHasTypeAttributes(ObjectId::Number);
858 }
859 
861 {
862  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Double);
863  EXPECT_EQ(SizeOf(refs), 1);
865 
866  ExpectHasBaseAttributes(ObjectId::Double);
867  ExpectHasTypeAttributes(ObjectId::Double);
868 }
869 
871 {
872  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Duration);
873  EXPECT_EQ(SizeOf(refs), 0);
874 
875  ExpectHasBaseAttributes(ObjectId::Duration);
876  ExpectHasTypeAttributes(ObjectId::Duration);
877 }
878 
880 {
881  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Float);
882  EXPECT_EQ(SizeOf(refs), 0);
883 
884  ExpectHasBaseAttributes(ObjectId::Float);
885  ExpectHasTypeAttributes(ObjectId::Float);
886 }
887 
889 {
890  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Integer);
891  EXPECT_EQ(SizeOf(refs), 5);
896 
897  ExpectHasBaseAttributes(ObjectId::Integer);
898  ExpectHasTypeAttributes(ObjectId::Integer);
899 }
900 
902 {
903  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int16);
904  EXPECT_EQ(SizeOf(refs), 0);
905 
906  ExpectHasBaseAttributes(ObjectId::Int16);
907  ExpectHasTypeAttributes(ObjectId::Int16);
908 }
909 
911 {
912  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int32);
913  EXPECT_EQ(SizeOf(refs), 0);
914 
915  ExpectHasBaseAttributes(ObjectId::Int32);
916  ExpectHasTypeAttributes(ObjectId::Int32);
917 }
918 
920 {
921  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int64);
922  EXPECT_EQ(SizeOf(refs), 0);
923 
924  ExpectHasBaseAttributes(ObjectId::Int64);
925  ExpectHasTypeAttributes(ObjectId::Int64);
926 }
927 
929 {
930  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SByte);
931  EXPECT_EQ(SizeOf(refs), 0);
932 
933  ExpectHasBaseAttributes(ObjectId::SByte);
934  ExpectHasTypeAttributes(ObjectId::SByte);
935 }
936 
938 {
939  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInteger);
940  EXPECT_EQ(SizeOf(refs), 4);
944  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Byte));
945 
946  ExpectHasBaseAttributes(ObjectId::UInteger);
947  ExpectHasTypeAttributes(ObjectId::UInteger);
948 }
949 
951 {
952  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt16);
953  EXPECT_EQ(SizeOf(refs), 0);
954 
955  ExpectHasBaseAttributes(ObjectId::UInt16);
956  ExpectHasTypeAttributes(ObjectId::UInt16);
957 }
958 
960 {
961  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt32);
962  EXPECT_EQ(SizeOf(refs), 1);
963 
964  ExpectHasBaseAttributes(ObjectId::UInt32);
965  ExpectHasTypeAttributes(ObjectId::UInt32);
966 }
967 
969 {
970  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt64);
971  EXPECT_EQ(SizeOf(refs), 1);
972 
973  ExpectHasBaseAttributes(ObjectId::UInt64);
974  ExpectHasTypeAttributes(ObjectId::UInt64);
975 }
976 
978 {
979  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Byte);
980  EXPECT_EQ(SizeOf(refs), 0);
981 
982  ExpectHasBaseAttributes(ObjectId::Byte);
983  ExpectHasTypeAttributes(ObjectId::Byte);
984 }
985 
987 {
988  const std::vector<ReferenceDescription> refs = Browse(ObjectId::QualifiedName);
989  EXPECT_EQ(SizeOf(refs), 0);
990 
991  ExpectHasBaseAttributes(ObjectId::QualifiedName);
992  ExpectHasTypeAttributes(ObjectId::QualifiedName);
993 }
994 
996 {
997  const std::vector<ReferenceDescription> refs = Browse(ObjectId::StatusCode);
998  EXPECT_EQ(SizeOf(refs), 0);
999 
1000  ExpectHasBaseAttributes(ObjectId::StatusCode);
1001  ExpectHasTypeAttributes(ObjectId::StatusCode);
1002 }
1003 
1005 {
1006  const std::vector<ReferenceDescription> refs = Browse(ObjectId::String);
1007  EXPECT_EQ(SizeOf(refs), 3);
1010 
1011  ExpectHasBaseAttributes(ObjectId::String);
1012  ExpectHasTypeAttributes(ObjectId::String);
1013 }
1014 
1016 {
1017  const std::vector<ReferenceDescription> refs = Browse(ObjectId::LocaleId);
1018  EXPECT_EQ(SizeOf(refs), 0);
1019 
1020  ExpectHasBaseAttributes(ObjectId::LocaleId);
1021  ExpectHasTypeAttributes(ObjectId::LocaleId);
1022 }
1023 
1025 {
1026  const std::vector<ReferenceDescription> refs = Browse(ObjectId::NumericRange);
1027  EXPECT_EQ(SizeOf(refs), 0);
1028 
1029  ExpectHasBaseAttributes(ObjectId::NumericRange);
1030  ExpectHasTypeAttributes(ObjectId::NumericRange);
1031 }
1032 
1034 {
1035  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Structure);
1036  EXPECT_EQ(SizeOf(refs), 45);
1046  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Range));
1049  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerDiagnosticsSummaryDataType));
1057  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UserIdentityToken));
1058 
1059  ExpectHasBaseAttributes(ObjectId::Structure);
1060  ExpectHasTypeAttributes(ObjectId::Structure);
1061 }
1062 
1063 TEST_F(StandardNamespaceStructure, StructureAddNodesItem)
1064 {
1065  const std::vector<ReferenceDescription> refs = Browse(ObjectId::AddNodesItem);
1066  EXPECT_EQ(SizeOf(refs), 2);
1067 
1068  ExpectHasBaseAttributes(ObjectId::AddNodesItem);
1069  ExpectHasTypeAttributes(ObjectId::AddNodesItem);
1070 }
1071 
1072 TEST_F(StandardNamespaceStructure, StructureAddReferencesItem)
1073 {
1074  const std::vector<ReferenceDescription> refs = Browse(ObjectId::AddReferencesItem);
1075  EXPECT_EQ(SizeOf(refs), 2);
1076 
1077  ExpectHasBaseAttributes(ObjectId::AddReferencesItem);
1078  ExpectHasTypeAttributes(ObjectId::AddReferencesItem);
1079 }
1080 
1081 TEST_F(StandardNamespaceStructure, StructureApplicationDescription)
1082 {
1083  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ApplicationDescription);
1084  EXPECT_EQ(SizeOf(refs), 0);
1085 
1086  ExpectHasBaseAttributes(ObjectId::ApplicationDescription);
1087  ExpectHasTypeAttributes(ObjectId::ApplicationDescription);
1088 }
1089 
1091 {
1092  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Argument);
1093  EXPECT_EQ(SizeOf(refs), 0);
1094 
1095  ExpectHasBaseAttributes(ObjectId::Argument);
1096  ExpectHasTypeAttributes(ObjectId::Argument);
1097 }
1098 
1100 {
1101  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfo);
1102  EXPECT_EQ(SizeOf(refs), 2);
1103 
1104  ExpectHasBaseAttributes(ObjectId::BuildInfo);
1105  ExpectHasTypeAttributes(ObjectId::BuildInfo);
1106 }
1107 
1108 TEST_F(StandardNamespaceStructure, StructureDeleteNodesItem)
1109 {
1110  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeleteNodesItem);
1111  EXPECT_EQ(SizeOf(refs), 2);
1112 
1113  ExpectHasBaseAttributes(ObjectId::DeleteNodesItem);
1114  ExpectHasTypeAttributes(ObjectId::DeleteNodesItem);
1115 }
1116 
1117 TEST_F(StandardNamespaceStructure, StructureDeleteReferencesItem)
1118 {
1119  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeleteReferencesItem);
1120  EXPECT_EQ(SizeOf(refs), 2);
1121 
1122  ExpectHasBaseAttributes(ObjectId::DeleteReferencesItem);
1123  ExpectHasTypeAttributes(ObjectId::DeleteReferencesItem);
1124 }
1125 
1126 TEST_F(StandardNamespaceStructure, StructureEUInformation)
1127 {
1128  const std::vector<ReferenceDescription> refs = Browse(ObjectId::EUInformation);
1129  EXPECT_EQ(SizeOf(refs), 0);
1130 
1131  ExpectHasBaseAttributes(ObjectId::EUInformation);
1132  ExpectHasTypeAttributes(ObjectId::EUInformation);
1133 }
1134 
1135 TEST_F(StandardNamespaceStructure, EUModelChangeStructureDataType)
1136 {
1137  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModelChangeStructureDataType);
1138  EXPECT_EQ(SizeOf(refs), 2);
1139 
1140  ExpectHasBaseAttributes(ObjectId::ModelChangeStructureDataType);
1141  ExpectHasTypeAttributes(ObjectId::ModelChangeStructureDataType);
1142 }
1143 
1145 {
1146  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Range);
1147  EXPECT_EQ(SizeOf(refs), 2);
1148 
1149  ExpectHasBaseAttributes(ObjectId::Range);
1150  ExpectHasTypeAttributes(ObjectId::Range);
1151 }
1152 
1153 TEST_F(StandardNamespaceStructure, StructureSamplingIntervalDiagnosticsDataType)
1154 {
1155  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsDataType);
1156  EXPECT_EQ(SizeOf(refs), 0);
1157 
1158  ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsDataType);
1159  ExpectHasTypeAttributes(ObjectId::SamplingIntervalDiagnosticsDataType);
1160 }
1161 
1162 TEST_F(StandardNamespaceStructure, StructureSemanticChangeStructureDataType)
1163 {
1164  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SemanticChangeStructureDataType);
1165  EXPECT_EQ(SizeOf(refs), 0);
1166 
1167  ExpectHasBaseAttributes(ObjectId::SemanticChangeStructureDataType);
1168  ExpectHasTypeAttributes(ObjectId::SemanticChangeStructureDataType);
1169 }
1170 
1171 TEST_F(StandardNamespaceStructure, StructureServerDiagnosticsSummaryType)
1172 {
1173  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsSummaryType);
1174  EXPECT_EQ(SizeOf(refs), 0);
1175 
1176  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsSummaryType);
1177  ExpectHasTypeAttributes(ObjectId::ServerDiagnosticsSummaryType);
1178 }
1179 
1180 TEST_F(StandardNamespaceStructure, StructureServerStatusDataType)
1181 {
1182  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusDataType);
1183  EXPECT_EQ(SizeOf(refs), 0);
1184 
1185  ExpectHasBaseAttributes(ObjectId::ServerStatusDataType);
1186  ExpectHasTypeAttributes(ObjectId::ServerStatusDataType);
1187 }
1188 
1189 TEST_F(StandardNamespaceStructure, StructureServiceCounterDataType)
1190 {
1191  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServiceCounterDataType);
1192  EXPECT_EQ(SizeOf(refs), 0);
1193 
1194  ExpectHasBaseAttributes(ObjectId::ServiceCounterDataType);
1195  ExpectHasTypeAttributes(ObjectId::ServiceCounterDataType);
1196 }
1197 
1198 TEST_F(StandardNamespaceStructure, StructureSessionDiagnosticsDataType)
1199 {
1200  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionDiagnosticsDataType);
1201  EXPECT_EQ(SizeOf(refs), 0);
1202 
1203  ExpectHasBaseAttributes(ObjectId::SessionDiagnosticsDataType);
1204  ExpectHasTypeAttributes(ObjectId::SessionDiagnosticsDataType);
1205 }
1206 
1207 TEST_F(StandardNamespaceStructure, StructureSessionSecurityDiagnosticsDataType)
1208 {
1209  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsDataType);
1210  EXPECT_EQ(SizeOf(refs), 0);
1211 
1212  ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsDataType);
1213  ExpectHasTypeAttributes(ObjectId::SessionSecurityDiagnosticsDataType);
1214 }
1215 
1216 TEST_F(StandardNamespaceStructure, StructureSignedSoftwareCertificate)
1217 {
1218  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SignedSoftwareCertificate);
1219  EXPECT_EQ(SizeOf(refs), 0);
1220 
1221  ExpectHasBaseAttributes(ObjectId::SignedSoftwareCertificate);
1222  ExpectHasTypeAttributes(ObjectId::SignedSoftwareCertificate);
1223 }
1224 
1225 TEST_F(StandardNamespaceStructure, StructureStatusResult)
1226 {
1227  const std::vector<ReferenceDescription> refs = Browse(ObjectId::StatusResult);
1228  EXPECT_EQ(SizeOf(refs), 0);
1229 
1230  ExpectHasBaseAttributes(ObjectId::StatusResult);
1231  ExpectHasTypeAttributes(ObjectId::StatusResult);
1232 }
1233 
1234 TEST_F(StandardNamespaceStructure, StructureSubscriptionDiagnosticsDataType)
1235 {
1236  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsDataType);
1237  EXPECT_EQ(SizeOf(refs), 0);
1238 
1239  ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsDataType);
1240  ExpectHasTypeAttributes(ObjectId::SubscriptionDiagnosticsDataType);
1241 }
1242 
1243 TEST_F(StandardNamespaceStructure, StructureUserIdentifyToken)
1244 {
1245  const std::vector<ReferenceDescription> refs = Browse(ObjectId::UserIdentityToken);
1246  EXPECT_EQ(SizeOf(refs), 3);
1247  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::AnonymousIdentityToken));
1248  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UserNameIdentityToken));
1249  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::X509IdentityToken));
1250 
1251  ExpectHasBaseAttributes(ObjectId::UserIdentityToken);
1252  ExpectHasTypeAttributes(ObjectId::UserIdentityToken);
1253 }
1254 
1256 {
1257  const std::vector<ReferenceDescription> refs = Browse(ObjectId::XmlElement);
1258  EXPECT_EQ(SizeOf(refs), 0);
1259 
1260  ExpectHasBaseAttributes(ObjectId::XmlElement);
1261  ExpectHasTypeAttributes(ObjectId::XmlElement);
1262 }
1263 
1265 {
1266  const std::vector<ReferenceDescription> refs = Browse(ObjectId::EventTypesFolder);
1267  EXPECT_EQ(SizeOf(refs), 2);
1270 
1271  ExpectHasBaseAttributes(ObjectId::EventTypesFolder);
1272 }
1273 
1275 {
1276  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType);
1277  EXPECT_EQ(SizeOf(refs), 11);
1281  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_EventId));
1282  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_EventType));
1283  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Message));
1284  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_ReceiveTime));
1285  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Severity));
1286  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_SourceName));
1287  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_SourceNode));
1288  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Time));
1289 
1290  ExpectHasBaseAttributes(ObjectId::BaseEventType);
1291  ExpectHasTypeAttributes(ObjectId::BaseEventType);
1292 }
1293 
1294 TEST_F(StandardNamespaceStructure, BaseModelChangeEventType)
1295 {
1296  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseModelChangeEventType);
1297  EXPECT_EQ(SizeOf(refs), 0);
1298 
1299  ExpectHasBaseAttributes(ObjectId::BaseModelChangeEventType);
1300  ExpectHasTypeAttributes(ObjectId::BaseModelChangeEventType);
1301 }
1302 
1303 TEST_F(StandardNamespaceStructure, SemanticChangeEventType)
1304 {
1305  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SemanticChangeEventType);
1306  EXPECT_EQ(SizeOf(refs), 0);
1307 
1308  ExpectHasBaseAttributes(ObjectId::SemanticChangeEventType);
1309  ExpectHasTypeAttributes(ObjectId::SemanticChangeEventType);
1310 }
1311 
1313 {
1314  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SystemEventType);
1315  EXPECT_EQ(SizeOf(refs), 4);
1320 
1321  ExpectHasBaseAttributes(ObjectId::SystemEventType);
1322  ExpectHasTypeAttributes(ObjectId::SystemEventType);
1323 }
1324 
1325 TEST_F(StandardNamespaceStructure, DeviceFailureEventType)
1326 {
1327  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeviceFailureEventType);
1328  EXPECT_EQ(SizeOf(refs), 0);
1329 
1330  ExpectHasBaseAttributes(ObjectId::DeviceFailureEventType);
1331  ExpectHasTypeAttributes(ObjectId::DeviceFailureEventType);
1332 }
1333 
1334 TEST_F(StandardNamespaceStructure, RefreshEndEventType)
1335 {
1336  const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshEndEventType);
1337  EXPECT_EQ(SizeOf(refs), 0);
1338 
1339  ExpectHasBaseAttributes(ObjectId::RefreshEndEventType);
1340  ExpectHasTypeAttributes(ObjectId::RefreshEndEventType);
1341 }
1342 
1343 TEST_F(StandardNamespaceStructure, RefreshRequiredEventType)
1344 {
1345  const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshRequiredEventType);
1346  EXPECT_EQ(SizeOf(refs), 0);
1347 
1348  ExpectHasBaseAttributes(ObjectId::RefreshRequiredEventType);
1349  ExpectHasTypeAttributes(ObjectId::RefreshRequiredEventType);
1350 }
1351 
1352 TEST_F(StandardNamespaceStructure, RefreshStartEventType)
1353 {
1354  const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshStartEventType);
1355  EXPECT_EQ(SizeOf(refs), 0);
1356 
1357  ExpectHasBaseAttributes(ObjectId::RefreshStartEventType);
1358  ExpectHasTypeAttributes(ObjectId::RefreshStartEventType);
1359 }
1360 
1362 {
1363  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_EventId);
1364  EXPECT_EQ(SizeOf(refs), 2);
1367 
1368  ExpectHasBaseAttributes(ObjectId::BaseEventType_EventId);
1369  ExpectHasVariableAttributes(ObjectId::BaseEventType_EventId);
1370 }
1371 
1373 {
1374  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_EventType);
1375  EXPECT_EQ(SizeOf(refs), 2);
1378 
1379  ExpectHasBaseAttributes(ObjectId::BaseEventType_EventType);
1380  ExpectHasVariableAttributes(ObjectId::BaseEventType_EventType);
1381 }
1382 
1384 {
1385  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Message);
1386  EXPECT_EQ(SizeOf(refs), 2);
1389 
1390  ExpectHasBaseAttributes(ObjectId::BaseEventType_Message);
1391  ExpectHasVariableAttributes(ObjectId::BaseEventType_Message);
1392 }
1393 
1395 {
1396  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_ReceiveTime);
1397  EXPECT_EQ(SizeOf(refs), 2);
1400 
1401  ExpectHasBaseAttributes(ObjectId::BaseEventType_ReceiveTime);
1402  ExpectHasVariableAttributes(ObjectId::BaseEventType_ReceiveTime);
1403 }
1404 
1406 {
1407  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Severity);
1408  EXPECT_EQ(SizeOf(refs), 2);
1411 
1412  ExpectHasBaseAttributes(ObjectId::BaseEventType_Severity);
1413  ExpectHasVariableAttributes(ObjectId::BaseEventType_Severity);
1414 }
1415 
1417 {
1418  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_SourceName);
1419  EXPECT_EQ(SizeOf(refs), 2);
1422 
1423  ExpectHasBaseAttributes(ObjectId::BaseEventType_SourceName);
1424  ExpectHasVariableAttributes(ObjectId::BaseEventType_SourceName);
1425 }
1426 
1428 {
1429  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_SourceNode);
1430  EXPECT_EQ(SizeOf(refs), 2);
1433 
1434  ExpectHasBaseAttributes(ObjectId::BaseEventType_SourceNode);
1435  ExpectHasVariableAttributes(ObjectId::BaseEventType_SourceNode);
1436 }
1437 
1439 {
1440  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Time);
1441  EXPECT_EQ(SizeOf(refs), 2);
1444 
1445  ExpectHasBaseAttributes(ObjectId::BaseEventType_Time);
1446  ExpectHasVariableAttributes(ObjectId::BaseEventType_Time);
1447 }
1448 
1450 {
1451  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ObjectTypesFolder);
1452  EXPECT_EQ(SizeOf(refs), 2);
1455 
1456  ExpectHasBaseAttributes(ObjectId::ObjectTypesFolder);
1457 }
1458 
1460 {
1461  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseObjectType);
1462  EXPECT_EQ(SizeOf(refs), 24);
1467  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HistoricalEventConfigurationType));
1474  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionsDiagnosticsSummaryType));
1478 
1479  ExpectHasBaseAttributes(ObjectId::BaseObjectType);
1480  ExpectHasTypeAttributes(ObjectId::BaseObjectType);
1481 }
1482 
1483 TEST_F(StandardNamespaceStructure, DataTypeEncodingType)
1484 {
1485  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeEncodingType);
1486  EXPECT_EQ(SizeOf(refs), 0);
1487 
1488  ExpectHasBaseAttributes(ObjectId::DataTypeEncodingType);
1489  ExpectHasTypeAttributes(ObjectId::DataTypeEncodingType);
1490 }
1491 
1493 {
1494  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeSystemType);
1495  EXPECT_EQ(SizeOf(refs), 0);
1496 
1497  ExpectHasBaseAttributes(ObjectId::DataTypeSystemType);
1498  ExpectHasTypeAttributes(ObjectId::DataTypeSystemType);
1499 }
1500 
1502 {
1503  const std::vector<ReferenceDescription> refs = Browse(ObjectId::FolderType);
1504  EXPECT_EQ(SizeOf(refs), 0);
1505 
1506  ExpectHasBaseAttributes(ObjectId::FolderType);
1507  ExpectHasTypeAttributes(ObjectId::FolderType);
1508 }
1509 
1510 //TEST_F(StandardNamespaceStructure, HistoricalEventConfigurationType)
1511 //{
1512 // const std::vector<ReferenceDescription> refs = Browse(ObjectId::HistoricalEventConfigurationType);
1513 // EXPECT_EQ(SizeOf(refs), 0);
1514 //
1515 // ExpectHasBaseAttributes(ObjectId::HistoricalEventConfigurationType);
1516 // ExpectHasTypeAttributes(ObjectId::HistoricalEventConfigurationType);
1517 //}
1518 
1520 {
1521  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRuleType);
1522  EXPECT_EQ(SizeOf(refs), 1);
1523  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRuleType_NamingRule));
1524 
1525  ExpectHasBaseAttributes(ObjectId::ModellingRuleType);
1526  ExpectHasTypeAttributes(ObjectId::ModellingRuleType);
1527 }
1528 
1530 {
1531  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRuleType_NamingRule);
1532  EXPECT_EQ(SizeOf(refs), 1);
1534 
1535  ExpectHasBaseAttributes(ObjectId::ModellingRuleType_NamingRule);
1536  ExpectHasVariableAttributes(ObjectId::ModellingRuleType_NamingRule);
1537 }
1538 
1539 TEST_F(StandardNamespaceStructure, ServerCapabilitiesType)
1540 {
1541  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType);
1542  EXPECT_EQ(SizeOf(refs), 13);
1543  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_LocaleIdArray));
1544  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints));
1545  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints));
1546  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MinSupportedSampleRate));
1547  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerCapabilitiesType_ModellingRules));
1548  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_ServerProfileArray));
1549 
1550  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType);
1551  ExpectHasTypeAttributes(ObjectId::ServerCapabilitiesType);
1552 }
1553 
1555 {
1556  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_ModellingRules);
1557  EXPECT_EQ(SizeOf(refs), 2);
1560 
1561  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_ModellingRules);
1562 }
1563 
1565 {
1566  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_LocaleIdArray);
1567  EXPECT_EQ(SizeOf(refs), 2);
1570 
1571  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_LocaleIdArray);
1572  ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_LocaleIdArray);
1573 }
1574 
1576 {
1577  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
1578  EXPECT_EQ(SizeOf(refs), 2);
1581 
1582  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
1583  ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
1584 }
1585 
1587 {
1588  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
1589  EXPECT_EQ(SizeOf(refs), 2);
1592 
1593  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
1594  ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
1595 }
1596 
1598 {
1599  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
1600  EXPECT_EQ(SizeOf(refs), 2);
1603 
1604  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
1605  ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
1606 }
1607 
1609 {
1610  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_ServerProfileArray);
1611  EXPECT_EQ(SizeOf(refs), 2);
1614 
1615  ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_ServerProfileArray);
1616  ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_ServerProfileArray);
1617 }
1618 
1619 TEST_F(StandardNamespaceStructure, ServerDiagnosticsType)
1620 {
1621  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType);
1622  EXPECT_EQ(SizeOf(refs), 5);
1623  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_EnabledFlag));
1624  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary));
1625  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray));
1626  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray));
1627  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerDiagnosticsType_SessionsDiagnosticsSummary));
1628 
1629  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType);
1630  ExpectHasTypeAttributes(ObjectId::ServerDiagnosticsType);
1631 }
1632 
1634 {
1635  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_EnabledFlag);
1636  EXPECT_EQ(SizeOf(refs), 2);
1639 
1640  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_EnabledFlag);
1641  ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_EnabledFlag);
1642 }
1643 
1645 {
1646  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
1647  EXPECT_EQ(SizeOf(refs), 2);
1650 
1651  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
1652  ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
1653 }
1654 
1656 {
1657  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
1658  EXPECT_EQ(SizeOf(refs), 2);
1661 
1662  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
1663  ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
1664 }
1665 
1667 {
1668  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SessionsDiagnosticsSummary);
1669  EXPECT_EQ(SizeOf(refs), 2);
1670  EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SessionsDiagnosticsSummaryType));
1672 
1673  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
1674 }
1675 
1677 {
1678  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray);
1679  EXPECT_EQ(SizeOf(refs), 2);
1682 
1683  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray);
1684 }
1685 
1686 TEST_F(StandardNamespaceStructure, ServerRedundancyType)
1687 {
1688  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerRedundancyType);
1689  EXPECT_EQ(SizeOf(refs), 1);
1690  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerRedundancyType_RedundancySupport));
1691 
1692  ExpectHasBaseAttributes(ObjectId::ServerRedundancyType);
1693  ExpectHasTypeAttributes(ObjectId::ServerRedundancyType);
1694 }
1695 
1696 TEST_F(StandardNamespaceStructure, RedundancySupportTypeRedundancySupport)
1697 {
1698  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerRedundancyType_RedundancySupport);
1699  EXPECT_EQ(SizeOf(refs), 1);
1701 
1702  ExpectHasBaseAttributes(ObjectId::ServerRedundancyType_RedundancySupport);
1703  ExpectHasVariableAttributes(ObjectId::ServerRedundancyType_RedundancySupport);
1704 }
1705 
1707 {
1708  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType);
1709  EXPECT_EQ(SizeOf(refs), 8);
1710  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_NamespaceArray));
1711  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServerArray));
1712  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerCapabilities));
1713  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerDiagnostics));
1714  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerRedundancy));
1715  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServerStatus));
1716  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServiceLevel));
1717  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_VendorServerInfo));
1718 
1719  ExpectHasBaseAttributes(ObjectId::ServerType);
1720  ExpectHasTypeAttributes(ObjectId::ServerType);
1721 }
1722 
1724 {
1725  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_NamespaceArray);
1726  EXPECT_EQ(SizeOf(refs), 1);
1728 
1729  ExpectHasBaseAttributes(ObjectId::ServerType_NamespaceArray);
1730  ExpectHasVariableAttributes(ObjectId::ServerType_NamespaceArray);
1731 }
1732 
1734 {
1735  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerArray);
1736  EXPECT_EQ(SizeOf(refs), 1);
1738 
1739  ExpectHasBaseAttributes(ObjectId::ServerType_ServerArray);
1740  ExpectHasVariableAttributes(ObjectId::ServerType_ServerArray);
1741 }
1742 
1744 {
1745  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerCapabilities);
1746  EXPECT_EQ(SizeOf(refs), 2);
1749 
1750  ExpectHasBaseAttributes(ObjectId::ServerType_ServerCapabilities);
1751  ExpectHasObjectAttributes(ObjectId::ServerType_ServerCapabilities);
1752 }
1753 
1755 {
1756  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerDiagnostics);
1757  EXPECT_EQ(SizeOf(refs), 2);
1760 
1761  ExpectHasBaseAttributes(ObjectId::ServerType_ServerDiagnostics);
1762  ExpectHasObjectAttributes(ObjectId::ServerType_ServerDiagnostics);
1763 }
1764 
1766 {
1767  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerRedundancy);
1768  EXPECT_EQ(SizeOf(refs), 2);
1771 
1772  ExpectHasBaseAttributes(ObjectId::ServerType_ServerRedundancy);
1773  ExpectHasObjectAttributes(ObjectId::ServerType_ServerRedundancy);
1774 }
1775 
1777 {
1778  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerStatus);
1779  EXPECT_EQ(SizeOf(refs), 2);
1782 
1783  ExpectHasBaseAttributes(ObjectId::ServerType_ServerStatus);
1784  ExpectHasVariableAttributes(ObjectId::ServerType_ServerStatus);
1785 }
1786 
1788 {
1789  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType);
1790  EXPECT_EQ(SizeOf(refs), 6);
1791  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_BuildDate));
1792  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_BuildNumber));
1793  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ManufacturerName));
1794  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ProductName));
1795  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ProductUri));
1796  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_SoftwareVersion));
1797 
1798  ExpectHasBaseAttributes(ObjectId::BuildInfoType);
1799  ExpectHasVariableTypeAttributes(ObjectId::BuildInfoType);
1800 }
1801 
1803 {
1804  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_BuildDate);
1805  EXPECT_EQ(SizeOf(refs), 1);
1807 
1808  ExpectHasBaseAttributes(ObjectId::BuildInfoType_BuildDate);
1809  ExpectHasVariableAttributes(ObjectId::BuildInfoType_BuildDate);
1810 }
1811 
1813 {
1814  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_BuildNumber);
1815  EXPECT_EQ(SizeOf(refs), 1);
1817 
1818  ExpectHasBaseAttributes(ObjectId::BuildInfoType_BuildNumber);
1819  ExpectHasVariableAttributes(ObjectId::BuildInfoType_BuildNumber);
1820 }
1821 
1823 {
1824  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ManufacturerName);
1825  EXPECT_EQ(SizeOf(refs), 1);
1827 
1828  ExpectHasBaseAttributes(ObjectId::BuildInfoType_ManufacturerName);
1829  ExpectHasVariableAttributes(ObjectId::BuildInfoType_ManufacturerName);
1830 }
1831 
1833 {
1834  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ProductName);
1835  EXPECT_EQ(SizeOf(refs), 1);
1837 
1838  ExpectHasBaseAttributes(ObjectId::BuildInfoType_ProductName);
1839  ExpectHasVariableAttributes(ObjectId::BuildInfoType_ProductName);
1840 }
1841 
1843 {
1844  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ProductUri);
1845  EXPECT_EQ(SizeOf(refs), 1);
1847 
1848  ExpectHasBaseAttributes(ObjectId::BuildInfoType_ProductUri);
1849  ExpectHasVariableAttributes(ObjectId::BuildInfoType_ProductUri);
1850 }
1851 
1853 {
1854  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_SoftwareVersion);
1855  EXPECT_EQ(SizeOf(refs), 1);
1857 
1858  ExpectHasBaseAttributes(ObjectId::BuildInfoType_SoftwareVersion);
1859  ExpectHasVariableAttributes(ObjectId::BuildInfoType_SoftwareVersion);
1860 }
1861 
1863 {
1864  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_CurrentTime);
1865  EXPECT_EQ(SizeOf(refs), 1);
1867 
1868  ExpectHasBaseAttributes(ObjectId::ServerStatusType_CurrentTime);
1869  ExpectHasVariableAttributes(ObjectId::ServerStatusType_CurrentTime);
1870 }
1871 
1873 {
1874  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_StartTime);
1875  EXPECT_EQ(SizeOf(refs), 1);
1877 
1878  ExpectHasBaseAttributes(ObjectId::ServerStatusType_StartTime);
1879  ExpectHasVariableAttributes(ObjectId::ServerStatusType_StartTime);
1880 }
1881 
1883 {
1884  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_State);
1885  EXPECT_EQ(SizeOf(refs), 1);
1887 
1888  ExpectHasBaseAttributes(ObjectId::ServerStatusType_State);
1889  ExpectHasVariableAttributes(ObjectId::ServerStatusType_State);
1890 }
1891 
1893 {
1894  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServiceLevel);
1895  EXPECT_EQ(SizeOf(refs), 2);
1898 
1899  ExpectHasBaseAttributes(ObjectId::ServerType_ServiceLevel);
1900  ExpectHasVariableAttributes(ObjectId::ServerType_ServiceLevel);
1901 }
1902 
1904 {
1905  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_VendorServerInfo);
1906  EXPECT_EQ(SizeOf(refs), 2);
1909 
1910  ExpectHasBaseAttributes(ObjectId::ServerType_VendorServerInfo);
1911  ExpectHasObjectAttributes(ObjectId::ServerType_VendorServerInfo);
1912 }
1913 
1914 TEST_F(StandardNamespaceStructure, SessionDiagnosticsObjectType)
1915 {
1916  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionDiagnosticsObjectType);
1917  EXPECT_EQ(SizeOf(refs), 0);
1918 
1919  ExpectHasBaseAttributes(ObjectId::SessionDiagnosticsObjectType);
1920  ExpectHasTypeAttributes(ObjectId::SessionDiagnosticsObjectType);
1921 }
1922 
1924 {
1925  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionsDiagnosticsSummaryType);
1926  EXPECT_EQ(SizeOf(refs), 0);
1927 
1928  ExpectHasBaseAttributes(ObjectId::SessionsDiagnosticsSummaryType);
1929  ExpectHasTypeAttributes(ObjectId::SessionsDiagnosticsSummaryType);
1930 }
1931 
1933 {
1934  const std::vector<ReferenceDescription> refs = Browse(ObjectId::StateType);
1935  EXPECT_EQ(SizeOf(refs), 1);
1936  EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::StateType_StateNumber));
1937 
1938  ExpectHasBaseAttributes(ObjectId::StateType);
1939  ExpectHasTypeAttributes(ObjectId::StateType);
1940 }
1941 
1943 {
1944  const std::vector<ReferenceDescription> refs = Browse(ObjectId::StateType_StateNumber);
1945  EXPECT_EQ(SizeOf(refs), 1);
1947 
1948  ExpectHasBaseAttributes(ObjectId::StateType_StateNumber);
1949  ExpectHasVariableAttributes(ObjectId::StateType_StateNumber);
1950 }
1951 
1953 {
1954  const std::vector<ReferenceDescription> refs = Browse(ObjectId::TransitionType);
1955  EXPECT_EQ(SizeOf(refs), 0);
1956 
1957  ExpectHasBaseAttributes(ObjectId::TransitionType);
1958  ExpectHasTypeAttributes(ObjectId::TransitionType);
1959 }
1960 
1961 TEST_F(StandardNamespaceStructure, VendorServerInfoType)
1962 {
1963  const std::vector<ReferenceDescription> refs = Browse(ObjectId::VendorServerInfoType);
1964  EXPECT_EQ(SizeOf(refs), 0);
1965 
1966  ExpectHasBaseAttributes(ObjectId::VendorServerInfoType);
1967  ExpectHasTypeAttributes(ObjectId::VendorServerInfoType);
1968 }
1969 
1971 {
1972  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ReferenceTypesFolder);
1973  EXPECT_EQ(SizeOf(refs), 2);
1976 
1977  ExpectHasBaseAttributes(ObjectId::ReferenceTypesFolder);
1978 }
1979 
1981 {
1982  const std::vector<ReferenceDescription> refs = Browse(ObjectId::References);
1983  EXPECT_EQ(SizeOf(refs), 2);
1986 
1987  ExpectHasReferenceTypeAttributes(ObjectId::References);
1989 }
1990 
1991 TEST_F(StandardNamespaceStructure, HierarchicalReferences)
1992 {
1993  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HierarchicalReferences);
1994  EXPECT_EQ(SizeOf(refs), 3);
1998 
1999  ExpectHasReferenceTypeAttributes(ObjectId::HierarchicalReferences);
2001 }
2002 
2004 {
2005  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasChild);
2006  EXPECT_EQ(SizeOf(refs), 2);
2009 
2010  ExpectHasReferenceTypeAttributes(ObjectId::HasChild);
2012 }
2013 
2015 {
2016  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Aggregates);
2017  EXPECT_EQ(SizeOf(refs), 3);
2021 
2022  ExpectHasReferenceTypeAttributes(ObjectId::Aggregates);
2024 }
2025 
2027 {
2028  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasComponent);
2029  EXPECT_EQ(SizeOf(refs), 1);
2031 
2032  ExpectHasReferenceTypeAttributes(ObjectId::HasComponent);
2034 }
2035 
2036 TEST_F(StandardNamespaceStructure, HasOrderedComponent)
2037 {
2038  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasOrderedComponent);
2039  EXPECT_EQ(SizeOf(refs), 0);
2040 
2041  ExpectHasReferenceTypeAttributes(ObjectId::HasOrderedComponent);
2043 }
2044 
2045 TEST_F(StandardNamespaceStructure, HasHistoricalConfiguration)
2046 {
2047  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasHistoricalConfiguration);
2048  EXPECT_EQ(SizeOf(refs), 0);
2049 
2050  ExpectHasReferenceTypeAttributes(ObjectId::HasHistoricalConfiguration);
2052 }
2053 
2055 {
2056  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasProperty);
2057  EXPECT_EQ(SizeOf(refs), 0);
2058 
2059  ExpectHasReferenceTypeAttributes(ObjectId::HasProperty);
2061 }
2062 
2064 {
2065  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasSubtype);
2066  EXPECT_EQ(SizeOf(refs), 0);
2067 
2068  ExpectHasReferenceTypeAttributes(ObjectId::HasSubtype);
2070 }
2071 
2073 {
2074  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEventSource);
2075  EXPECT_EQ(SizeOf(refs), 1);
2077 
2078  ExpectHasReferenceTypeAttributes(ObjectId::HasEventSource);
2080 }
2081 
2083 {
2084  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasNotifier);
2085  EXPECT_EQ(SizeOf(refs), 0);
2086 
2087  ExpectHasReferenceTypeAttributes(ObjectId::HasNotifier);
2089 }
2090 
2092 {
2093  const std::vector<ReferenceDescription> refs = Browse(ObjectId::Organizes);
2094  EXPECT_EQ(SizeOf(refs), 0);
2095 
2096  ExpectHasReferenceTypeAttributes(ObjectId::Organizes);
2098 }
2099 
2100 TEST_F(StandardNamespaceStructure, NonHierarchicalReferences)
2101 {
2102  const std::vector<ReferenceDescription> refs = Browse(ObjectId::NonHierarchicalReferences);
2103  EXPECT_EQ(SizeOf(refs), 10 - 1); // XXX
2110  //EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasModelParent));
2114 
2115  ExpectHasReferenceTypeAttributes(ObjectId::NonHierarchicalReferences);
2117 }
2118 
2120 {
2121  const std::vector<ReferenceDescription> refs = Browse(ObjectId::FromState);
2122  EXPECT_EQ(SizeOf(refs), 0);
2123 
2124  ExpectHasReferenceTypeAttributes(ObjectId::FromState);
2126 }
2127 
2129 {
2130  const std::vector<ReferenceDescription> refs = Browse(ObjectId::GeneratesEvent);
2131  EXPECT_EQ(SizeOf(refs), 0);
2132 
2133  ExpectHasReferenceTypeAttributes(ObjectId::GeneratesEvent);
2135 }
2136 
2138 {
2139  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasCause);
2140  EXPECT_EQ(SizeOf(refs), 0);
2141 
2142  ExpectHasReferenceTypeAttributes(ObjectId::HasCause);
2144 }
2145 
2147 {
2148  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasDescription);
2149  EXPECT_EQ(SizeOf(refs), 0);
2150 
2151  ExpectHasReferenceTypeAttributes(ObjectId::HasDescription);
2153 }
2154 
2156 {
2157  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEffect);
2158  EXPECT_EQ(SizeOf(refs), 0);
2159 
2160  ExpectHasReferenceTypeAttributes(ObjectId::HasEffect);
2162 }
2163 
2165 {
2166  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEncoding);
2167  EXPECT_EQ(SizeOf(refs), 0);
2168 
2169  ExpectHasReferenceTypeAttributes(ObjectId::HasEncoding);
2171 }
2172 
2173 //TEST_F(StandardNamespaceStructure, HasModelParent)
2174 //{
2175 // const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasModelParent);
2176 // EXPECT_EQ(SizeOf(refs), 0);
2177 //
2178 // ExpectHasReferenceTypeAttributes(ObjectId::HasModelParent);
2179 // EXPECT_TRUE(HasAttribute(ObjectId::HasModelParent, AttributeId::InverseName));
2180 //}
2181 
2183 {
2184  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasModellingRule);
2185  EXPECT_EQ(SizeOf(refs), 0);
2186 
2187  ExpectHasReferenceTypeAttributes(ObjectId::HasModellingRule);
2189 }
2190 
2192 {
2193  const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasTypeDefinition);
2194  EXPECT_EQ(SizeOf(refs), 0);
2195 
2196  ExpectHasReferenceTypeAttributes(ObjectId::HasTypeDefinition);
2198 }
2199 
2201 {
2202  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ToState);
2203  EXPECT_EQ(SizeOf(refs), 0);
2204 
2205  ExpectHasReferenceTypeAttributes(ObjectId::ToState);
2207 }
2208 
2210 {
2211  const std::vector<ReferenceDescription> refs = Browse(ObjectId::VariableTypesFolder);
2212  EXPECT_EQ(SizeOf(refs), 2);
2215 
2216  ExpectHasBaseAttributes(ObjectId::VariableTypesFolder);
2217 }
2218 
2220 {
2221  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseVariableType);
2222  EXPECT_EQ(SizeOf(refs), 2);
2225 
2226  ExpectHasBaseAttributes(ObjectId::BaseVariableType);
2227  ExpectHasVariableTypeAttributes(ObjectId::BaseVariableType);
2228 }
2229 
2230 TEST_F(StandardNamespaceStructure, BaseDataVariableType)
2231 {
2232  const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseDataVariableType);
2233  EXPECT_EQ(SizeOf(refs), 14);
2242  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsArrayType));
2243  EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsVariableType));
2248 
2249  ExpectHasBaseAttributes(ObjectId::BaseDataVariableType);
2250  ExpectHasVariableTypeAttributes(ObjectId::BaseDataVariableType);
2251 }
2252 
2253 TEST_F(StandardNamespaceStructure, DataTypeDescriptionType)
2254 {
2255  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeDescriptionType);
2256  EXPECT_EQ(SizeOf(refs), 0);
2257 
2258  ExpectHasBaseAttributes(ObjectId::DataTypeDescriptionType);
2259  ExpectHasVariableTypeAttributes(ObjectId::DataTypeDescriptionType);
2260 }
2261 
2262 TEST_F(StandardNamespaceStructure, DataTypeDictionaryType)
2263 {
2264  const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeDictionaryType);
2265  EXPECT_EQ(SizeOf(refs), 0);
2266 
2267  ExpectHasBaseAttributes(ObjectId::DataTypeDictionaryType);
2268  ExpectHasVariableTypeAttributes(ObjectId::DataTypeDictionaryType);
2269 }
2270 
2271 TEST_F(StandardNamespaceStructure, SamplingIntervalDiagnosticsArrayType)
2272 {
2273  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsArrayType);
2274  EXPECT_EQ(SizeOf(refs), 0);
2275 
2276  ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsArrayType);
2277  ExpectHasVariableTypeAttributes(ObjectId::SamplingIntervalDiagnosticsArrayType);
2278 }
2279 
2280 TEST_F(StandardNamespaceStructure, SamplingIntervalDiagnosticsType)
2281 {
2282  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsType);
2283  EXPECT_EQ(SizeOf(refs), 0);
2284 
2285  ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsType);
2286  ExpectHasVariableTypeAttributes(ObjectId::SamplingIntervalDiagnosticsType);
2287 }
2288 
2289 TEST_F(StandardNamespaceStructure, ServerDiagnosticsSummaryDataType)
2290 {
2291  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsSummaryDataType);
2292  EXPECT_EQ(SizeOf(refs), 0);
2293 
2294  ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsSummaryDataType);
2295  ExpectHasDataTypeAttributes(ObjectId::ServerDiagnosticsSummaryDataType);
2296 }
2297 
2299 {
2300  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType);
2301  EXPECT_EQ(SizeOf(refs), 4);
2302  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_StartTime));
2303  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_CurrentTime));
2304  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_State));
2305  EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_BuildInfo));
2306 
2307  ExpectHasBaseAttributes(ObjectId::ServerStatusType);
2308  ExpectHasVariableTypeAttributes(ObjectId::ServerStatusType);
2309 }
2310 
2311 TEST_F(StandardNamespaceStructure, ServerVendorCapabilityType)
2312 {
2313  const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerVendorCapabilityType);
2314  EXPECT_EQ(SizeOf(refs), 0);
2315 
2316  ExpectHasBaseAttributes(ObjectId::ServerVendorCapabilityType);
2317  ExpectHasVariableTypeAttributes(ObjectId::ServerVendorCapabilityType);
2318 }
2319 
2320 TEST_F(StandardNamespaceStructure, DISABLED_SessionsDiagnosticsArrayType)
2321 {
2322 // const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionsDiagnosticsDataType);
2323 // EXPECT_EQ(SizeOf(refs), 0);
2324 //
2325 // ExpectHasBaseAttributes(ObjectId::SessionsDiagnosticsArrayType);
2326 // ExpectHasVariableTypeAttributes(ObjectId::SessionsDiagnosticsArrayType);
2327 }
2328 
2329 TEST_F(StandardNamespaceStructure, DISABLED_ServerDiagnosticsVariableType)
2330 {
2331 // const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsVariableType);
2332 // EXPECT_EQ(SizeOf(refs), 0);
2333 //
2334 // ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsVariableType);
2335 // ExpectHasVariableTypeAttributes(ObjectId::ServerDiagnosticsVariableType);
2336 }
2337 
2338 TEST_F(StandardNamespaceStructure, SessionSecurityDiagnosticsArrayType)
2339 {
2340  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsArrayType);
2341  EXPECT_EQ(SizeOf(refs), 0);
2342 
2343  ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsArrayType);
2344  ExpectHasVariableTypeAttributes(ObjectId::SessionSecurityDiagnosticsArrayType);
2345 }
2346 
2347 TEST_F(StandardNamespaceStructure, SessionSecurityDiagnosticsType)
2348 {
2349  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsType);
2350  EXPECT_EQ(SizeOf(refs), 0);
2351 
2352  ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsType);
2353  ExpectHasVariableTypeAttributes(ObjectId::SessionSecurityDiagnosticsType);
2354 }
2355 
2356 TEST_F(StandardNamespaceStructure, SubscriptionDiagnosticsArrayType)
2357 {
2358  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsArrayType);
2359  EXPECT_EQ(SizeOf(refs), 0);
2360 
2361  ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsArrayType);
2362  ExpectHasVariableTypeAttributes(ObjectId::SubscriptionDiagnosticsArrayType);
2363 }
2364 
2365 TEST_F(StandardNamespaceStructure, SubscriptionDiagnosticsType)
2366 {
2367  const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsType);
2368  EXPECT_EQ(SizeOf(refs), 0);
2369 
2370  ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsType);
2371  ExpectHasVariableTypeAttributes(ObjectId::SubscriptionDiagnosticsType);
2372 }
2373 
2375 {
2376  const std::vector<ReferenceDescription> refs = Browse(ObjectId::PropertyType);
2377  EXPECT_EQ(SizeOf(refs), 0);
2378 
2379  ExpectHasBaseAttributes(ObjectId::PropertyType);
2380  ExpectHasVariableTypeAttributes(ObjectId::PropertyType);
2381 }
const char SourceName[]
Definition: strings.h:180
const char ServerDiagnosticsType[]
Definition: strings.h:153
const char ReceiveTime[]
Definition: strings.h:130
const char RefreshEndEventType[]
Definition: strings.h:134
const char SessionDiagnosticsDataType[]
Definition: strings.h:171
const char NumericRange[]
Definition: strings.h:117
const char BuildDate[]
Definition: strings.h:33
TypeWithSize< 8 >::Int Int64
const char Range[]
Definition: strings.h:129
const char ServerStatus[]
Definition: strings.h:162
const char CurrentTime[]
Definition: strings.h:39
const char ImageGif[]
Definition: strings.h:87
const char References[]
Definition: strings.h:132
std::vector< OpcUa::ReadValueId > AttributesToRead
const char SubscriptionDiagnosticsArrayType[]
Definition: strings.h:183
const char SemanticChangeStructureDataType[]
Definition: strings.h:145
void ExpectHasBaseAttributes(ObjectId id)
const char Integer[]
Definition: strings.h:93
const char VariableTypes[]
Definition: strings.h:205
const char String[]
Definition: strings.h:192
const char Enumeration[]
Definition: strings.h:53
const char StatusResult[]
Definition: strings.h:191
const char RefreshStartEventType[]
Definition: strings.h:136
std::size_t SizeOf(std::vector< T > vec)
const char LocalizedText[]
Definition: strings.h:96
const char AddReferencesItem[]
Definition: strings.h:19
const char ModellingRule_MandatoryShared[]
Definition: strings.h:110
const char ServerType[]
Definition: strings.h:164
const char StateNumber[]
Definition: strings.h:188
const char DeviceFailureEventType[]
Definition: strings.h:49
const char State[]
Definition: strings.h:187
const char UtcTime[]
Definition: strings.h:128
const char MaxBrowseContinuationPoints[]
Definition: strings.h:99
const char HasModellingRule[]
Definition: strings.h:75
const char HasProperty[]
Definition: strings.h:79
TEST_F(TestInfoTest, Names)
const char Byte[]
Definition: strings.h:37
TypeWithSize< 4 >::Int Int32
const char HasTypeDefinition[]
Definition: strings.h:81
const char StartTime[]
Definition: strings.h:186
const char HasEffect[]
Definition: strings.h:71
const char StateType[]
Definition: strings.h:189
std::vector< BrowseDescription > NodesToBrowse
Definition: protocol/view.h:50
const char DataTypeDictionaryType[]
Definition: strings.h:41
const char ServerVendorCapabilityType[]
Definition: strings.h:165
const char Boolean[]
Definition: strings.h:32
TypeWithSize< 4 >::UInt UInt32
const char SubscriptionDiagnosticsArray[]
Definition: strings.h:182
const char EventTypes[]
Definition: strings.h:59
const char DeleteNodesItem[]
Definition: strings.h:47
double Duration
Definition: datetime.h:53
const char EventId[]
Definition: strings.h:57
const char MinSupportedSampleRate[]
Definition: strings.h:105
const char Severity[]
Definition: strings.h:175
const char ServerRedundancyType[]
Definition: strings.h:159
const char SamplingIntervalDiagnosticsArrayType[]
Definition: strings.h:139
const char QualifiedName[]
Definition: strings.h:127
const char ModellingRule_ExposesItsArray[]
Definition: strings.h:108
const char ObjectTypes[]
Definition: strings.h:122
const char SystemEventType[]
Definition: strings.h:194
const char ReferenceTypes[]
Definition: strings.h:133
const char ModellingRules[]
Definition: strings.h:106
TypeWithSize< 8 >::UInt UInt64
const char SessionSecurityDiagnosticsDataType[]
Definition: strings.h:170
std::vector< T > Browse(const NodeId &node, NodeClass nodeClassMask, Services::SharedPtr services)
Definition: model_impl.h:31
const char ImageBmp[]
Definition: strings.h:86
const char NodeId[]
Definition: strings.h:116
ServerState
Definition: enums.h:324
const char EventType[]
Definition: strings.h:58
const char DataTypes[]
Definition: strings.h:43
std::vector< ReferenceDescription > Browse(const NodeId &id) const
const char SoftwareVersion[]
Definition: strings.h:179
const char NonHierarchicalReferences[]
Definition: strings.h:118
SecurityTokenRequestType
Definition: enums.h:92
#define EXPECT_TRUE(condition)
const char Number[]
Definition: strings.h:119
static Server::AddressSpace::SharedPtr NameSpace
const char SamplingIntervalDiagnosticsType[]
Definition: strings.h:140
const char SignedSoftwareCertificate[]
Definition: strings.h:177
const char BaseDataVariableType[]
Definition: strings.h:27
bool HasAttribute(OpcUa::ObjectId object, OpcUa::AttributeId attribute)
const char SourceNode[]
Definition: strings.h:181
const char ModellingRule_Mandatory[]
Definition: strings.h:109
const char DataTypeDescriptionType[]
Definition: strings.h:40
const char ServerCapabilitiesType[]
Definition: strings.h:149
const char HasEncoding[]
Definition: strings.h:72
void ExpectHasVariableTypeAttributes(ObjectId id)
const char HasHistoricalConfiguration[]
Definition: strings.h:74
const char ServiceCounterDataType[]
Definition: strings.h:166
const char SessionDiagnosticsSummary[]
Definition: strings.h:173
const char ServerDiagnostics[]
Definition: strings.h:150
const char BaseModelChangeEventType[]
Definition: strings.h:29
const char ServiceLevel[]
Definition: strings.h:167
const char ByteString[]
Definition: strings.h:38
const char HasDescription[]
Definition: strings.h:70
void ExpectHasDataTypeAttributes(ObjectId id)
const char NamespaceArray[]
Definition: strings.h:113
description
Definition: setup.py:43
const char Int16[]
Definition: strings.h:90
const char BaseEventType[]
Definition: strings.h:28
const char UInteger[]
Definition: strings.h:200
const char SemanticChangeEventType[]
Definition: strings.h:146
const char IdType[]
Definition: strings.h:84
const char HasEventSource[]
Definition: strings.h:73
const char SubscriptionDiagnosticsType[]
Definition: strings.h:184
ObjectId
Definition: object_ids.h:12
const char HasNotifier[]
Definition: strings.h:77
const char ServerStatusType[]
Definition: strings.h:163
#define EXPECT_FALSE(condition)
FloatingPoint< float > Float
void ExpectHasObjectAttributes(ObjectId id)
const char DataTypeSystemType[]
Definition: strings.h:44
const char Structure[]
Definition: strings.h:193
const char Organizes[]
Definition: strings.h:123
const char MaxHistoryContinuationPoints[]
Definition: strings.h:100
const char BaseObjectType[]
Definition: strings.h:30
const char SamplingIntervalDiagnosticsDataType[]
Definition: strings.h:141
const char GeneratesEvent[]
Definition: strings.h:64
MessageSecurityMode
Definition: enums.h:68
const char SessionSecurityDiagnosticsType[]
Definition: strings.h:169
const char Guid[]
Definition: strings.h:65
void FillStandardNamespace(OpcUa::NodeManagementServices &registry, const Common::Logger::SharedPtr &logger)
const char PropertyType[]
Definition: strings.h:126
OPC UA Address space part. GNU LGPL.
const char LocaleIdArray[]
Definition: strings.h:95
RedundancySupport
Definition: enums.h:311
const char HasCause[]
Definition: strings.h:66
const char VendorServerInfo[]
Definition: strings.h:206
const char ServerCapabilities[]
Definition: strings.h:148
const char FromState[]
Definition: strings.h:63
const char HierarchicalReferences[]
Definition: strings.h:82
const char DataTypeEncodingType[]
Definition: strings.h:42
const char DataValue[]
Definition: strings.h:45
const char HasComponent[]
Definition: strings.h:69
const char VendorServerInfoType[]
Definition: strings.h:207
bool HasReference(std::vector< ReferenceDescription > refs, ReferenceId referenceId, NodeId targetNode) const
void ExpectHasReferenceTypeAttributes(ObjectId id)
const char DeleteReferencesItem[]
Definition: strings.h:48
#define ASSERT_EQ(val1, val2)
const char SessionSecurityDiagnosticsArrayType[]
Definition: strings.h:168
const char BuildNumber[]
Definition: strings.h:36
const char ServerStatusDataType[]
Definition: strings.h:161
BrowseResultMask ResultMask
Definition: protocol/view.h:41
NodeClass
Definition: enums.h:39
const char NamingRule[]
Definition: strings.h:114
const char SessionDiagnosticsSummaryType[]
Definition: strings.h:174
A Node object represent an OPC-UA node. It is high level object intended for developper who want to e...
Definition: node.h:42
const char ModellingRuleType[]
Definition: strings.h:112
const char ServerRedundancy[]
Definition: strings.h:158
const char HasOrderedComponent[]
Definition: strings.h:78
const char BuildInfo[]
Definition: strings.h:34
const char EnableFlag[]
Definition: strings.h:55
FloatingPoint< double > Double
void ExpectHasVariableAttributes(ObjectId id)
const char ManufacturerName[]
Definition: strings.h:98
const char ServerDiagnosticsSummary[]
Definition: strings.h:155
const char ModellingRule_Optional[]
Definition: strings.h:111
const char ApplicationDescription[]
Definition: strings.h:23
const char BuildInfoType[]
Definition: strings.h:35
const char UInt16[]
Definition: strings.h:202
const char ProductName[]
Definition: strings.h:124
const char ImagePng[]
Definition: strings.h:89
BrowseDirection Direction
Definition: protocol/view.h:37
const char HasChild[]
Definition: strings.h:68
Common::Logger::SharedPtr Logger
const char SessionDiagnosticsObjectType[]
Definition: strings.h:172
std::string LocaleId
Definition: types.h:33
const char SByte[]
Definition: strings.h:142
AddressSpace::UniquePtr CreateAddressSpace(const Common::Logger::SharedPtr &logger)
const char RefreshRequiredEventType[]
Definition: strings.h:135
const char ExpandedNodeId[]
Definition: strings.h:60
const char HasSubtype[]
Definition: strings.h:80
const char FolderType[]
Definition: strings.h:62
const char ModelChangeStructureDataType[]
Definition: strings.h:104
const char ToState[]
Definition: strings.h:196
const char Aggregates[]
Definition: strings.h:20
const char AddNodesItem[]
Definition: strings.h:18
OpcUa::NodeId NodeId
const char BaseVariableType[]
Definition: strings.h:31
const char ServerArray[]
Definition: strings.h:147
#define EXPECT_EQ(expected, actual)
std::shared_ptr< logger > stderr_color_mt(const std::string &logger_name)
Definition: spdlog_impl.h:150
const char SamplingIntervalDiagnosticsArray[]
Definition: strings.h:138
const char DateTime[]
Definition: strings.h:46
const char BaseDataType[]
Definition: strings.h:26
const char Server[]
Definition: strings.h:121
const char Image[]
Definition: strings.h:85
const char Argument[]
Definition: strings.h:24
const char DiagnosticInfo[]
Definition: strings.h:50
const char XmlElement[]
Definition: strings.h:210
const char SubscriptionDiagnosticsDataType[]
Definition: strings.h:185
const char TransitionType[]
Definition: strings.h:197
const char EUInformation[]
Definition: strings.h:56
const char ServerDiagnosticsSummaryType[]
Definition: strings.h:154
void drop_all()
Definition: spdlog_impl.h:260
const char ServerProfileArray[]
Definition: strings.h:157


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:08