00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <opc/ua/protocol/object_ids.h>
00012 #include <opc/ua/protocol/attribute_ids.h>
00013 #include <opc/ua/protocol/status_codes.h>
00014
00015 #include <opc/ua/server/address_space.h>
00016 #include <opc/ua/server/standard_address_space.h>
00017
00018 #include <functional>
00019 #include <gmock/gmock.h>
00020 #include <gtest/gtest.h>
00021
00022 using namespace testing;
00023 using namespace OpcUa;
00024
00025
00026 static Server::AddressSpace::SharedPtr NameSpace;
00027
00028
00029 class StandardNamespaceStructure : public Test
00030 {
00031 protected:
00032 virtual void SetUp()
00033 {
00034 const bool debug = false;
00035 if (!NameSpace)
00036 {
00037 NameSpace = OpcUa::Server::CreateAddressSpace(debug);
00038 OpcUa::Server::FillStandardNamespace(*NameSpace, debug);
00039 }
00040 }
00041
00042 virtual void TearDown()
00043 {
00044
00045 }
00046
00047 protected:
00048 std::vector<ReferenceDescription> Browse(const NodeId& id) const
00049 {
00050 OpcUa::BrowseDescription description;
00051 description.NodeToBrowse = id;
00052 OpcUa::NodesQuery query;
00053 query.NodesToBrowse.push_back(description);
00054 auto result = NameSpace->Browse(query);
00055 if (result.empty())
00056 {
00057 return std::vector<ReferenceDescription>();
00058 }
00059 return result[0].Referencies;
00060 }
00061
00062 bool HasReference(std::vector<ReferenceDescription> refs, ReferenceId referenceId, NodeId targetNode) const
00063 {
00064 for (const ReferenceDescription ref : refs)
00065 {
00066 if (ref.TargetNodeId == targetNode && ref.ReferenceTypeId == referenceId)
00067 {
00068 return true;
00069 }
00070 }
00071 return false;
00072 }
00073
00074 bool HasAttribute(OpcUa::ObjectId object, OpcUa::AttributeId attribute)
00075 {
00076 ReadParameters params;
00077 ReadValueId id;
00078 id.NodeId = object;
00079 id.AttributeId = attribute;
00080 params.AttributesToRead.push_back(id);
00081 std::vector<DataValue> values = NameSpace->Read(params);
00082 return values.size() == 1 && values[0].Status == StatusCode::Good;
00083 }
00084
00085 void ExpectHasBaseAttributes(ObjectId id)
00086 {
00087 EXPECT_TRUE(HasAttribute(id, AttributeId::NodeId));
00088 EXPECT_TRUE(HasAttribute(id, AttributeId::NodeClass));
00089 EXPECT_TRUE(HasAttribute(id, AttributeId::BrowseName));
00090 EXPECT_TRUE(HasAttribute(id, AttributeId::DisplayName));
00091 EXPECT_TRUE(HasAttribute(id, AttributeId::Description));
00092 EXPECT_TRUE(HasAttribute(id, AttributeId::WriteMask));
00093 EXPECT_TRUE(HasAttribute(id, AttributeId::UserWriteMask));
00094 }
00095
00096 void ExpectHasObjectAttributes(ObjectId id)
00097 {
00098 EXPECT_TRUE(HasAttribute(id, AttributeId::EventNotifier));
00099 }
00100
00101 void ExpectHasTypeAttributes(ObjectId id)
00102 {
00103 EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
00104 }
00105
00106 void ExpectHasDataTypeAttributes(ObjectId id)
00107 {
00108 EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
00109 }
00110
00111 void ExpectHasVariableAttributes(ObjectId id)
00112 {
00113 EXPECT_TRUE(HasAttribute(id, AttributeId::Value));
00114 EXPECT_TRUE(HasAttribute(id, AttributeId::DataType));
00115 EXPECT_TRUE(HasAttribute(id, AttributeId::ValueRank));
00116 EXPECT_TRUE(HasAttribute(id, AttributeId::ArrayDimensions));
00117 EXPECT_TRUE(HasAttribute(id, AttributeId::AccessLevel));
00118 EXPECT_TRUE(HasAttribute(id, AttributeId::UserAccessLevel));
00119 EXPECT_TRUE(HasAttribute(id, AttributeId::MinimumSamplingInterval));
00120 EXPECT_TRUE(HasAttribute(id, AttributeId::Historizing));
00121 }
00122
00123 void ExpectHasVariableTypeAttributes(ObjectId id)
00124 {
00125 EXPECT_TRUE(HasAttribute(id, AttributeId::Value));
00126 EXPECT_TRUE(HasAttribute(id, AttributeId::DataType));
00127 EXPECT_TRUE(HasAttribute(id, AttributeId::ValueRank));
00128 EXPECT_TRUE(HasAttribute(id, AttributeId::ArrayDimensions));
00129 EXPECT_TRUE(HasAttribute(id, AttributeId::IsAbstract));
00130 }
00131
00132 void ExpectHasReferenceTypeAttributes(ObjectId id)
00133 {
00134 ExpectHasBaseAttributes(id);
00135 ExpectHasTypeAttributes(id);
00136 EXPECT_TRUE(HasAttribute(id, AttributeId::Symmetric));
00137 }
00138 };
00139
00140 template <typename T>
00141 std::size_t SizeOf(std::vector<T> vec)
00142 {
00143 return vec.size();
00144 }
00145
00146 template <typename T>
00147 inline NodeId Node(T value)
00148 {
00149 return NodeId(value);
00150 }
00151
00152 TEST_F(StandardNamespaceStructure, CanBrowseRootFolder_By_Organizes_RefType)
00153 {
00154 OpcUa::BrowseDescription description;
00155 description.NodeToBrowse = ObjectId::RootFolder;
00156 description.Direction = BrowseDirection::Forward;
00157 description.ReferenceTypeId = ReferenceId::Organizes;
00158 description.IncludeSubtypes = true;
00159 description.NodeClasses = NodeClass::Object;
00160 description.ResultMask = BrowseResultMask::All;
00161
00162 OpcUa::NodesQuery query;
00163 query.NodesToBrowse.push_back(description);
00164 std::vector<BrowseResult> results = NameSpace->Browse(query);
00165 ASSERT_EQ(results.size(), 1);
00166 ASSERT_EQ(results[0].Referencies.size(), 3);
00167 }
00168
00169 TEST_F(StandardNamespaceStructure, CanBrowseRootFolder_By_HierarchicalReferencies_Subtypes)
00170 {
00171 OpcUa::BrowseDescription description;
00172 description.NodeToBrowse = ObjectId::RootFolder;
00173 description.Direction = BrowseDirection::Forward;
00174 description.ReferenceTypeId = ReferenceId::HierarchicalReferences;
00175 description.IncludeSubtypes = true;
00176 description.NodeClasses = NodeClass::Object;
00177 description.ResultMask = BrowseResultMask::All;
00178 OpcUa::NodesQuery query;
00179 query.NodesToBrowse.push_back(description);
00180 std::vector<BrowseResult> results = NameSpace->Browse(query);
00181 ASSERT_EQ(results.size(), 1);
00182 ASSERT_EQ(results[0].Referencies.size(), 3);
00183 }
00184
00185 TEST_F(StandardNamespaceStructure, CheckRoot)
00186 {
00187 const std::vector<ReferenceDescription> refs = Browse(ObjectId::RootFolder);
00188 EXPECT_EQ(SizeOf(refs), 4);
00189 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ObjectsFolder));
00190 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::TypesFolder));
00191 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ViewsFolder));
00192 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
00193
00194 ExpectHasBaseAttributes(ObjectId::RootFolder);
00195 }
00196
00197 TEST_F(StandardNamespaceStructure, Server)
00198 {
00199 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server);
00200 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerType));
00201
00202 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerArray));
00203 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_NamespaceArray));
00204 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServiceLevel));
00205 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus));
00206 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerCapabilities));
00207 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics));
00208 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_VendorServerInfo));
00209 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerRedundancy));
00210
00211 ExpectHasBaseAttributes(ObjectId::Server);
00212 }
00213
00214 TEST_F(StandardNamespaceStructure, Server_ServerArray)
00215 {
00216 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerArray);
00217 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00218
00219 ExpectHasBaseAttributes(ObjectId::Server_ServerArray);
00220 ExpectHasVariableAttributes(ObjectId::Server_ServerArray);
00221 }
00222
00223 TEST_F(StandardNamespaceStructure, Server_NamespaceArray)
00224 {
00225 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_NamespaceArray);
00226 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00227
00228 ExpectHasBaseAttributes(ObjectId::Server_NamespaceArray);
00229 ExpectHasVariableAttributes(ObjectId::Server_NamespaceArray);
00230 }
00231
00232 TEST_F(StandardNamespaceStructure, Server_ServiceLevel)
00233 {
00234 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServiceLevel);
00235 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00236
00237 ExpectHasBaseAttributes(ObjectId::Server_ServiceLevel);
00238 ExpectHasVariableAttributes(ObjectId::Server_ServiceLevel);
00239 }
00240
00241 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities)
00242 {
00243 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities);
00244 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerCapabilitiesType));
00245
00246 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_ServerProfileArray));
00247 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MinSupportedSampleRate));
00248 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints));
00249 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints));
00250 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints));
00251 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerCapabilities_ModellingRules));
00252 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerCapabilities_SoftwareCertificates));
00253
00254 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities);
00255 }
00256
00257 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_ServerProfileArray)
00258 {
00259 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_ServerProfileArray);
00260 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00261
00262 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_ServerProfileArray);
00263 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_ServerProfileArray);
00264 }
00265
00266 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MinSupportedSampleRate)
00267 {
00268 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
00269 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00270
00271 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
00272 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MinSupportedSampleRate);
00273 }
00274
00275 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxBrowseContinuationPoints)
00276 {
00277 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
00278 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00279
00280 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
00281 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxBrowseContinuationPoints);
00282 }
00283
00284 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxQueryContinuationPoints)
00285 {
00286 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
00287 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00288
00289 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
00290 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxQueryContinuationPoints);
00291 }
00292
00293 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_MaxHistoryContinuationPoints)
00294 {
00295 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
00296 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00297
00298 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
00299 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_MaxHistoryContinuationPoints);
00300 }
00301
00302 TEST_F(StandardNamespaceStructure, Server_ServerCapabilities_SoftwareCertificates)
00303 {
00304 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
00305 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00306
00307 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
00308 ExpectHasVariableAttributes(ObjectId::Server_ServerCapabilities_SoftwareCertificates);
00309 }
00310
00311 TEST_F(StandardNamespaceStructure, Server_ModellingRules)
00312 {
00313 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerCapabilities_ModellingRules);
00314 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
00315
00317
00318
00319
00320
00321 ExpectHasBaseAttributes(ObjectId::Server_ServerCapabilities_ModellingRules);
00322 }
00323
00324 TEST_F(StandardNamespaceStructure, ModellingRule_ExposesItsArray)
00325 {
00326 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_ExposesItsArray);
00327 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ModellingRuleType));
00328
00329 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_ExposesItsArray_NamingRule));
00330
00331 ExpectHasBaseAttributes(ObjectId::ModellingRule_ExposesItsArray);
00332 }
00333
00334 TEST_F(StandardNamespaceStructure, ModellingRule_ExposesItsArray_NamingRule)
00335 {
00336 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
00337 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00338
00339 ExpectHasBaseAttributes(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
00340 ExpectHasVariableAttributes(ObjectId::ModellingRule_ExposesItsArray_NamingRule);
00341 }
00342
00343
00344 TEST_F(StandardNamespaceStructure, ModellingRule_Mandatory)
00345 {
00346 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Mandatory);
00347 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ModellingRuleType));
00348
00349 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_Mandatory_NamingRule));
00350
00351 ExpectHasBaseAttributes(ObjectId::ModellingRule_Mandatory);
00352 }
00353
00354 TEST_F(StandardNamespaceStructure, ModellingRule_Mandatory_NamingRule)
00355 {
00356 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Mandatory_NamingRule);
00357 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00358
00359 ExpectHasBaseAttributes(ObjectId::ModellingRule_Mandatory_NamingRule);
00360 ExpectHasVariableAttributes(ObjectId::ModellingRule_Mandatory_NamingRule);
00361 }
00362
00363 TEST_F(StandardNamespaceStructure, ModellingRule_MandatoryShared)
00364 {
00365 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_MandatoryShared);
00366 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ModellingRuleType));
00367
00368 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_MandatoryShared_NamingRule));
00369
00370 ExpectHasBaseAttributes(ObjectId::ModellingRule_MandatoryShared);
00371 }
00372
00373 TEST_F(StandardNamespaceStructure, ModellingRule_MandatoryShared_NamingRule)
00374 {
00375 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_MandatoryShared_NamingRule);
00376 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00377
00378 ExpectHasBaseAttributes(ObjectId::ModellingRule_MandatoryShared_NamingRule);
00379 ExpectHasVariableAttributes(ObjectId::ModellingRule_MandatoryShared_NamingRule);
00380 }
00381
00382 TEST_F(StandardNamespaceStructure, ModellingRule_Optional)
00383 {
00384 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Optional);
00385 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ModellingRuleType));
00386
00387 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRule_Optional_NamingRule));
00388
00389 ExpectHasBaseAttributes(ObjectId::ModellingRule_Optional);
00390 }
00391
00392 TEST_F(StandardNamespaceStructure, ModellingRule_Optional_NamingRule)
00393 {
00394 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRule_Optional_NamingRule);
00395 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00396
00397 ExpectHasBaseAttributes(ObjectId::ModellingRule_Optional_NamingRule);
00398 ExpectHasVariableAttributes(ObjectId::ModellingRule_Optional_NamingRule);
00399 }
00400
00401 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics)
00402 {
00403 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics);
00404 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerDiagnosticsType));
00405
00406 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::Server_ServerDiagnostics_EnabledFlag));
00407 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray));
00408 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary));
00409 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary));
00410 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray));
00411
00412 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics);
00413 }
00414
00415 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_EnabledFlag)
00416 {
00417 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_EnabledFlag);
00418 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
00419
00420 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_EnabledFlag);
00421 ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_EnabledFlag);
00422 }
00423
00424 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray)
00425 {
00426 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
00427 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SamplingIntervalDiagnosticsArrayType));
00428
00429 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
00430 ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_SamplingIntervalDiagnosticsArray);
00431 }
00432
00433 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SessionsDiagnosticsSummary)
00434 {
00435 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary);
00436 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SessionsDiagnosticsSummaryType));
00437
00438 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SessionsDiagnosticsSummary);
00439 }
00440
00441 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_ServerDiagnosticsSummary)
00442 {
00443 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
00444 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerDiagnosticsSummaryType));
00445
00446 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
00447 ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_ServerDiagnosticsSummary);
00448 }
00449
00450 TEST_F(StandardNamespaceStructure, Server_ServerDiagnostics_SubscriptionRateDiagnosticsArray)
00451 {
00452 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
00453 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SubscriptionDiagnosticsArrayType));
00454
00455 ExpectHasBaseAttributes(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
00456 ExpectHasVariableAttributes(ObjectId::Server_ServerDiagnostics_SubscriptionDiagnosticsArray);
00457 }
00458
00459 TEST_F(StandardNamespaceStructure, Server_ServerRedundancy)
00460 {
00461 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerRedundancy);
00462 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerRedundancyType));
00463
00464
00465
00466 ExpectHasBaseAttributes(ObjectId::Server_ServerRedundancy);
00467 }
00468
00469 TEST_F(StandardNamespaceStructure, Server_ServerStatus)
00470 {
00471 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus);
00472 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerStatusType));
00473
00474 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo));
00475 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_CurrentTime));
00476 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_StartTime));
00477 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_State));
00478
00479 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus);
00480 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus);
00481 }
00482
00483 TEST_F(StandardNamespaceStructure, Server_BuildInfo)
00484 {
00485 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo);
00486 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BuildInfoType));
00487
00488 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_BuildDate));
00489 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_BuildNumber));
00490 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName));
00491 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ProductName));
00492 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_ProductUri));
00493 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion));
00494
00495 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo);
00496 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo);
00497 }
00498
00499 TEST_F(StandardNamespaceStructure, Server_BuildInfo_BuildDate)
00500 {
00501 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_BuildDate);
00502 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00503
00504 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo);
00505 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo);
00506 }
00507
00508 TEST_F(StandardNamespaceStructure, Server_BuildInfo_BuildNumber)
00509 {
00510 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
00511 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00512
00513 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
00514 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_BuildNumber);
00515 }
00516
00517 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ManufacturerName)
00518 {
00519 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
00520 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00521
00522 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
00523 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ManufacturerName);
00524 }
00525
00526 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ProductName)
00527 {
00528 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
00529 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00530
00531 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
00532 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductName);
00533 }
00534
00535 TEST_F(StandardNamespaceStructure, Server_BuildInfo_ProductUri)
00536 {
00537 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
00538 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00539
00540 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
00541 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_ProductUri);
00542 }
00543
00544 TEST_F(StandardNamespaceStructure, Server_BuildInfo_SoftwareVersion)
00545 {
00546 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
00547 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00548
00549 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
00550 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_BuildInfo_SoftwareVersion);
00551 }
00552
00553 TEST_F(StandardNamespaceStructure, Server_ServerStatus_CurrentTime)
00554 {
00555 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_CurrentTime);
00556 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00557
00558 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_CurrentTime);
00559 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_CurrentTime);
00560 }
00561
00562 TEST_F(StandardNamespaceStructure, Server_ServerStatus_StartTime)
00563 {
00564 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_StartTime);
00565 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00566
00567 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_StartTime);
00568 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_StartTime);
00569 }
00570
00571 TEST_F(StandardNamespaceStructure, Server_ServerStatus_State)
00572 {
00573 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_ServerStatus_State);
00574 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
00575
00576 ExpectHasBaseAttributes(ObjectId::Server_ServerStatus_State);
00577 ExpectHasVariableAttributes(ObjectId::Server_ServerStatus_State);
00578 }
00579
00580 TEST_F(StandardNamespaceStructure, Server_VendorServerInfo)
00581 {
00582 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Server_VendorServerInfo);
00583 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::VendorServerInfoType));
00584
00585 ExpectHasBaseAttributes(ObjectId::Server_VendorServerInfo);
00586 }
00587
00588 TEST_F(StandardNamespaceStructure, CheckTypes)
00589 {
00590 const std::vector<ReferenceDescription> refs = Browse(ObjectId::TypesFolder);
00591 EXPECT_EQ(SizeOf(refs), 6);
00592 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
00593 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::DataTypesFolder));
00594 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::EventTypesFolder));
00595 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ObjectTypesFolder));
00596 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::ReferenceTypesFolder));
00597 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::VariableTypesFolder));
00598
00599 ExpectHasBaseAttributes(ObjectId::TypesFolder);
00600 }
00601
00602 TEST_F(StandardNamespaceStructure, DataTypes)
00603 {
00604 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypesFolder);
00605 EXPECT_EQ(SizeOf(refs), 4);
00606 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
00607 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::BaseDataType));
00608
00609 ExpectHasBaseAttributes(ObjectId::DataTypesFolder);
00610 }
00611
00612 TEST_F(StandardNamespaceStructure, BaseDataType)
00613 {
00614 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseDataType);
00615 EXPECT_EQ(SizeOf(refs), 16);
00616 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Boolean));
00617 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ByteString));
00618 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DataValue));
00619 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DateTime));
00620 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DiagnosticInfo));
00621 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Enumeration));
00622 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ExpandedNodeId));
00623 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Guid));
00624 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::LocalizedText));
00625 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::NodeId));
00626 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Number));
00627 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::QualifiedName));
00628 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::StatusCode));
00629 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::String));
00630 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Structure));
00631 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::XmlElement));
00632
00633 ExpectHasBaseAttributes(ObjectId::BaseDataType);
00634 ExpectHasTypeAttributes(ObjectId::BaseDataType);
00635 }
00636
00637 TEST_F(StandardNamespaceStructure, Boolean)
00638 {
00639 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Boolean);
00640 EXPECT_EQ(SizeOf(refs), 0);
00641
00642 ExpectHasBaseAttributes(ObjectId::Boolean);
00643 ExpectHasTypeAttributes(ObjectId::Boolean);
00644 }
00645
00646 TEST_F(StandardNamespaceStructure, ByteString)
00647 {
00648 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ByteString);
00649 EXPECT_EQ(SizeOf(refs), 3);
00650 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Image));
00651
00652 ExpectHasBaseAttributes(ObjectId::ByteString);
00653 ExpectHasTypeAttributes(ObjectId::ByteString);
00654 }
00655
00656 TEST_F(StandardNamespaceStructure, Image)
00657 {
00658 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Image);
00659 EXPECT_EQ(SizeOf(refs), 4);
00660 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageBMP));
00661 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageGIF));
00662 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImageJPG));
00663 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ImagePNG));
00664
00665 ExpectHasBaseAttributes(ObjectId::Image);
00666 ExpectHasTypeAttributes(ObjectId::Image);
00667 }
00668
00669 TEST_F(StandardNamespaceStructure, ImageBmp)
00670 {
00671 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageBMP);
00672 EXPECT_EQ(SizeOf(refs), 0);
00673
00674 ExpectHasBaseAttributes(ObjectId::ImageBMP);
00675 ExpectHasTypeAttributes(ObjectId::ImageBMP);
00676 }
00677
00678 TEST_F(StandardNamespaceStructure, ImageGif)
00679 {
00680 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageGIF);
00681 EXPECT_EQ(SizeOf(refs), 0);
00682
00683 ExpectHasBaseAttributes(ObjectId::ImageGIF);
00684 ExpectHasTypeAttributes(ObjectId::ImageGIF);
00685 }
00686
00687 TEST_F(StandardNamespaceStructure, ImageJPG)
00688 {
00689 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImageJPG);
00690 EXPECT_EQ(SizeOf(refs), 0);
00691
00692 ExpectHasBaseAttributes(ObjectId::ImageJPG);
00693 ExpectHasTypeAttributes(ObjectId::ImageJPG);
00694 }
00695
00696 TEST_F(StandardNamespaceStructure, ImagePng)
00697 {
00698 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ImagePNG);
00699 EXPECT_EQ(SizeOf(refs), 0);
00700
00701 ExpectHasBaseAttributes(ObjectId::ImagePNG);
00702 ExpectHasTypeAttributes(ObjectId::ImagePNG);
00703 }
00704
00705 TEST_F(StandardNamespaceStructure, DateTime)
00706 {
00707 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DateTime);
00708 EXPECT_EQ(SizeOf(refs), 2);
00709 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UtcTime));
00710
00711 ExpectHasBaseAttributes(ObjectId::DateTime);
00712 ExpectHasTypeAttributes(ObjectId::DateTime);
00713 }
00714
00715 TEST_F(StandardNamespaceStructure, UtcTime)
00716 {
00717 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UtcTime);
00718 EXPECT_EQ(SizeOf(refs), 0);
00719
00720 ExpectHasBaseAttributes(ObjectId::UtcTime);
00721 ExpectHasTypeAttributes(ObjectId::UtcTime);
00722 }
00723
00724 TEST_F(StandardNamespaceStructure, DiagnosticInfo)
00725 {
00726 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DiagnosticInfo);
00727 EXPECT_EQ(SizeOf(refs), 0);
00728
00729 ExpectHasBaseAttributes(ObjectId::DiagnosticInfo);
00730 ExpectHasTypeAttributes(ObjectId::DiagnosticInfo);
00731 }
00732
00733 TEST_F(StandardNamespaceStructure, Enumeration)
00734 {
00735 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Enumeration);
00736 EXPECT_EQ(SizeOf(refs), 17);
00737 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::IdType));
00738 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::MessageSecurityMode));
00739 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::NodeClass));
00740 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::RedundancySupport));
00741 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SecurityTokenRequestType));
00742 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerState));
00743
00744 ExpectHasBaseAttributes(ObjectId::Enumeration);
00745 ExpectHasTypeAttributes(ObjectId::Enumeration);
00746 }
00747
00748 TEST_F(StandardNamespaceStructure, IdType)
00749 {
00750 const std::vector<ReferenceDescription> refs = Browse(ObjectId::IdType);
00751 EXPECT_EQ(SizeOf(refs), 1);
00752
00753 ExpectHasBaseAttributes(ObjectId::IdType);
00754 ExpectHasTypeAttributes(ObjectId::IdType);
00755 }
00756
00757 TEST_F(StandardNamespaceStructure, MessageSecurityMode)
00758 {
00759 const std::vector<ReferenceDescription> refs = Browse(ObjectId::MessageSecurityMode);
00760 EXPECT_EQ(SizeOf(refs), 1);
00761
00762 ExpectHasBaseAttributes(ObjectId::MessageSecurityMode);
00763 ExpectHasTypeAttributes(ObjectId::MessageSecurityMode);
00764 }
00765
00766 TEST_F(StandardNamespaceStructure, NodeClass)
00767 {
00768 const std::vector<ReferenceDescription> refs = Browse(ObjectId::NodeClass);
00769 EXPECT_EQ(SizeOf(refs), 1);
00770
00771 ExpectHasBaseAttributes(ObjectId::NodeClass);
00772 ExpectHasTypeAttributes(ObjectId::NodeClass);
00773 }
00774
00775 TEST_F(StandardNamespaceStructure, RedundancySupport)
00776 {
00777 const std::vector<ReferenceDescription> refs = Browse(ObjectId::RedundancySupport);
00778 EXPECT_EQ(SizeOf(refs), 1);
00779
00780 ExpectHasBaseAttributes(ObjectId::RedundancySupport);
00781 ExpectHasTypeAttributes(ObjectId::RedundancySupport);
00782 }
00783
00784 TEST_F(StandardNamespaceStructure, SecurityTokenRequestType)
00785 {
00786 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SecurityTokenRequestType);
00787 EXPECT_EQ(SizeOf(refs), 1);
00788
00789 ExpectHasBaseAttributes(ObjectId::SecurityTokenRequestType);
00790 ExpectHasTypeAttributes(ObjectId::SecurityTokenRequestType);
00791 }
00792
00793 TEST_F(StandardNamespaceStructure, ServerState)
00794 {
00795 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerState);
00796 EXPECT_EQ(SizeOf(refs), 1);
00797
00798 ExpectHasBaseAttributes(ObjectId::ServerState);
00799 ExpectHasTypeAttributes(ObjectId::ServerState);
00800 }
00801
00802 TEST_F(StandardNamespaceStructure, ExpandedNodeId)
00803 {
00804 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ExpandedNodeId);
00805 EXPECT_EQ(SizeOf(refs), 0);
00806
00807 ExpectHasBaseAttributes(ObjectId::ExpandedNodeId);
00808 ExpectHasTypeAttributes(ObjectId::ExpandedNodeId);
00809 }
00810
00811 TEST_F(StandardNamespaceStructure, Guid)
00812 {
00813 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Guid);
00814 EXPECT_EQ(SizeOf(refs), 0);
00815
00816 ExpectHasBaseAttributes(ObjectId::Guid);
00817 ExpectHasTypeAttributes(ObjectId::Guid);
00818 }
00819
00820 TEST_F(StandardNamespaceStructure, LocalizedText)
00821 {
00822 const std::vector<ReferenceDescription> refs = Browse(ObjectId::LocalizedText);
00823 EXPECT_EQ(SizeOf(refs), 0);
00824
00825 ExpectHasBaseAttributes(ObjectId::LocalizedText);
00826 ExpectHasTypeAttributes(ObjectId::LocalizedText);
00827 }
00828
00829 TEST_F(StandardNamespaceStructure, NodeId)
00830 {
00831 const std::vector<ReferenceDescription> refs = Browse(ObjectId::NodeId);
00832 EXPECT_EQ(SizeOf(refs), 1);
00833
00834 ExpectHasBaseAttributes(ObjectId::NodeId);
00835 ExpectHasTypeAttributes(ObjectId::NodeId);
00836 }
00837
00838 TEST_F(StandardNamespaceStructure, Number)
00839 {
00840 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Number);
00841 EXPECT_EQ(SizeOf(refs), 4);
00842 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Double));
00843 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Float));
00844 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Integer));
00845
00846
00847 ExpectHasBaseAttributes(ObjectId::Number);
00848 ExpectHasTypeAttributes(ObjectId::Number);
00849 }
00850
00851 TEST_F(StandardNamespaceStructure, Double)
00852 {
00853 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Double);
00854 EXPECT_EQ(SizeOf(refs), 1);
00855 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Duration));
00856
00857 ExpectHasBaseAttributes(ObjectId::Double);
00858 ExpectHasTypeAttributes(ObjectId::Double);
00859 }
00860
00861 TEST_F(StandardNamespaceStructure, Duration)
00862 {
00863 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Duration);
00864 EXPECT_EQ(SizeOf(refs), 0);
00865
00866 ExpectHasBaseAttributes(ObjectId::Duration);
00867 ExpectHasTypeAttributes(ObjectId::Duration);
00868 }
00869
00870 TEST_F(StandardNamespaceStructure, Float)
00871 {
00872 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Float);
00873 EXPECT_EQ(SizeOf(refs), 0);
00874
00875 ExpectHasBaseAttributes(ObjectId::Float);
00876 ExpectHasTypeAttributes(ObjectId::Float);
00877 }
00878
00879 TEST_F(StandardNamespaceStructure, Integer)
00880 {
00881 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Integer);
00882 EXPECT_EQ(SizeOf(refs), 5);
00883 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Int16));
00884 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Int32));
00885 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Int64));
00886 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SByte));
00887
00888 ExpectHasBaseAttributes(ObjectId::Integer);
00889 ExpectHasTypeAttributes(ObjectId::Integer);
00890 }
00891
00892 TEST_F(StandardNamespaceStructure, Int16)
00893 {
00894 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int16);
00895 EXPECT_EQ(SizeOf(refs), 0);
00896
00897 ExpectHasBaseAttributes(ObjectId::Int16);
00898 ExpectHasTypeAttributes(ObjectId::Int16);
00899 }
00900
00901 TEST_F(StandardNamespaceStructure, Int32)
00902 {
00903 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int32);
00904 EXPECT_EQ(SizeOf(refs), 0);
00905
00906 ExpectHasBaseAttributes(ObjectId::Int32);
00907 ExpectHasTypeAttributes(ObjectId::Int32);
00908 }
00909
00910 TEST_F(StandardNamespaceStructure, Int64)
00911 {
00912 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Int64);
00913 EXPECT_EQ(SizeOf(refs), 0);
00914
00915 ExpectHasBaseAttributes(ObjectId::Int64);
00916 ExpectHasTypeAttributes(ObjectId::Int64);
00917 }
00918
00919 TEST_F(StandardNamespaceStructure, SByte)
00920 {
00921 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SByte);
00922 EXPECT_EQ(SizeOf(refs), 0);
00923
00924 ExpectHasBaseAttributes(ObjectId::SByte);
00925 ExpectHasTypeAttributes(ObjectId::SByte);
00926 }
00927
00928 TEST_F(StandardNamespaceStructure, UInteger)
00929 {
00930 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInteger);
00931 EXPECT_EQ(SizeOf(refs), 4);
00932 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UInt16));
00933 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UInt32));
00934 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UInt64));
00935 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Byte));
00936
00937 ExpectHasBaseAttributes(ObjectId::UInteger);
00938 ExpectHasTypeAttributes(ObjectId::UInteger);
00939 }
00940
00941 TEST_F(StandardNamespaceStructure, UInt16)
00942 {
00943 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt16);
00944 EXPECT_EQ(SizeOf(refs), 0);
00945
00946 ExpectHasBaseAttributes(ObjectId::UInt16);
00947 ExpectHasTypeAttributes(ObjectId::UInt16);
00948 }
00949
00950 TEST_F(StandardNamespaceStructure, UInt32)
00951 {
00952 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt32);
00953 EXPECT_EQ(SizeOf(refs), 1);
00954
00955 ExpectHasBaseAttributes(ObjectId::UInt32);
00956 ExpectHasTypeAttributes(ObjectId::UInt32);
00957 }
00958
00959 TEST_F(StandardNamespaceStructure, UInt64)
00960 {
00961 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UInt64);
00962 EXPECT_EQ(SizeOf(refs), 1);
00963
00964 ExpectHasBaseAttributes(ObjectId::UInt64);
00965 ExpectHasTypeAttributes(ObjectId::UInt64);
00966 }
00967
00968 TEST_F(StandardNamespaceStructure, Byte)
00969 {
00970 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Byte);
00971 EXPECT_EQ(SizeOf(refs), 0);
00972
00973 ExpectHasBaseAttributes(ObjectId::Byte);
00974 ExpectHasTypeAttributes(ObjectId::Byte);
00975 }
00976
00977 TEST_F(StandardNamespaceStructure, QualifiedName)
00978 {
00979 const std::vector<ReferenceDescription> refs = Browse(ObjectId::QualifiedName);
00980 EXPECT_EQ(SizeOf(refs), 0);
00981
00982 ExpectHasBaseAttributes(ObjectId::QualifiedName);
00983 ExpectHasTypeAttributes(ObjectId::QualifiedName);
00984 }
00985
00986 TEST_F(StandardNamespaceStructure, StatusCode)
00987 {
00988 const std::vector<ReferenceDescription> refs = Browse(ObjectId::StatusCode);
00989 EXPECT_EQ(SizeOf(refs), 0);
00990
00991 ExpectHasBaseAttributes(ObjectId::StatusCode);
00992 ExpectHasTypeAttributes(ObjectId::StatusCode);
00993 }
00994
00995 TEST_F(StandardNamespaceStructure, String)
00996 {
00997 const std::vector<ReferenceDescription> refs = Browse(ObjectId::String);
00998 EXPECT_EQ(SizeOf(refs), 3);
00999 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::LocaleId));
01000 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::NumericRange));
01001
01002 ExpectHasBaseAttributes(ObjectId::String);
01003 ExpectHasTypeAttributes(ObjectId::String);
01004 }
01005
01006 TEST_F(StandardNamespaceStructure, LocaleId)
01007 {
01008 const std::vector<ReferenceDescription> refs = Browse(ObjectId::LocaleId);
01009 EXPECT_EQ(SizeOf(refs), 0);
01010
01011 ExpectHasBaseAttributes(ObjectId::LocaleId);
01012 ExpectHasTypeAttributes(ObjectId::LocaleId);
01013 }
01014
01015 TEST_F(StandardNamespaceStructure, NumericRange)
01016 {
01017 const std::vector<ReferenceDescription> refs = Browse(ObjectId::NumericRange);
01018 EXPECT_EQ(SizeOf(refs), 0);
01019
01020 ExpectHasBaseAttributes(ObjectId::NumericRange);
01021 ExpectHasTypeAttributes(ObjectId::NumericRange);
01022 }
01023
01024 TEST_F(StandardNamespaceStructure, Structure)
01025 {
01026 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Structure);
01027 EXPECT_EQ(SizeOf(refs), 45);
01028 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::AddNodesItem));
01029 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::AddReferencesItem));
01030 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ApplicationDescription));
01031 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Argument));
01032 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::BuildInfo));
01033 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DeleteNodesItem));
01034 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DeleteReferencesItem));
01035 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::EUInformation));
01036 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ModelChangeStructureDataType));
01037 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Range));
01038 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SamplingIntervalDiagnosticsDataType));
01039 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SemanticChangeStructureDataType));
01040 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerDiagnosticsSummaryDataType));
01041 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerStatusDataType));
01042 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServiceCounterDataType));
01043 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsDataType));
01044 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionSecurityDiagnosticsDataType));
01045 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SignedSoftwareCertificate));
01046 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::StatusResult));
01047 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SubscriptionDiagnosticsDataType));
01048 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UserIdentityToken));
01049
01050 ExpectHasBaseAttributes(ObjectId::Structure);
01051 ExpectHasTypeAttributes(ObjectId::Structure);
01052 }
01053
01054 TEST_F(StandardNamespaceStructure, StructureAddNodesItem)
01055 {
01056 const std::vector<ReferenceDescription> refs = Browse(ObjectId::AddNodesItem);
01057 EXPECT_EQ(SizeOf(refs), 2);
01058
01059 ExpectHasBaseAttributes(ObjectId::AddNodesItem);
01060 ExpectHasTypeAttributes(ObjectId::AddNodesItem);
01061 }
01062
01063 TEST_F(StandardNamespaceStructure, StructureAddReferencesItem)
01064 {
01065 const std::vector<ReferenceDescription> refs = Browse(ObjectId::AddReferencesItem);
01066 EXPECT_EQ(SizeOf(refs), 2);
01067
01068 ExpectHasBaseAttributes(ObjectId::AddReferencesItem);
01069 ExpectHasTypeAttributes(ObjectId::AddReferencesItem);
01070 }
01071
01072 TEST_F(StandardNamespaceStructure, StructureApplicationDescription)
01073 {
01074 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ApplicationDescription);
01075 EXPECT_EQ(SizeOf(refs), 0);
01076
01077 ExpectHasBaseAttributes(ObjectId::ApplicationDescription);
01078 ExpectHasTypeAttributes(ObjectId::ApplicationDescription);
01079 }
01080
01081 TEST_F(StandardNamespaceStructure, StructureArgument)
01082 {
01083 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Argument);
01084 EXPECT_EQ(SizeOf(refs), 0);
01085
01086 ExpectHasBaseAttributes(ObjectId::Argument);
01087 ExpectHasTypeAttributes(ObjectId::Argument);
01088 }
01089
01090 TEST_F(StandardNamespaceStructure, StructureBuildInfo)
01091 {
01092 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfo);
01093 EXPECT_EQ(SizeOf(refs), 2);
01094
01095 ExpectHasBaseAttributes(ObjectId::BuildInfo);
01096 ExpectHasTypeAttributes(ObjectId::BuildInfo);
01097 }
01098
01099 TEST_F(StandardNamespaceStructure, StructureDeleteNodesItem)
01100 {
01101 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeleteNodesItem);
01102 EXPECT_EQ(SizeOf(refs), 2);
01103
01104 ExpectHasBaseAttributes(ObjectId::DeleteNodesItem);
01105 ExpectHasTypeAttributes(ObjectId::DeleteNodesItem);
01106 }
01107
01108 TEST_F(StandardNamespaceStructure, StructureDeleteReferencesItem)
01109 {
01110 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeleteReferencesItem);
01111 EXPECT_EQ(SizeOf(refs), 2);
01112
01113 ExpectHasBaseAttributes(ObjectId::DeleteReferencesItem);
01114 ExpectHasTypeAttributes(ObjectId::DeleteReferencesItem);
01115 }
01116
01117 TEST_F(StandardNamespaceStructure, StructureEUInformation)
01118 {
01119 const std::vector<ReferenceDescription> refs = Browse(ObjectId::EUInformation);
01120 EXPECT_EQ(SizeOf(refs), 0);
01121
01122 ExpectHasBaseAttributes(ObjectId::EUInformation);
01123 ExpectHasTypeAttributes(ObjectId::EUInformation);
01124 }
01125
01126 TEST_F(StandardNamespaceStructure, EUModelChangeStructureDataType)
01127 {
01128 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModelChangeStructureDataType);
01129 EXPECT_EQ(SizeOf(refs), 2);
01130
01131 ExpectHasBaseAttributes(ObjectId::ModelChangeStructureDataType);
01132 ExpectHasTypeAttributes(ObjectId::ModelChangeStructureDataType);
01133 }
01134
01135 TEST_F(StandardNamespaceStructure, StructureRange)
01136 {
01137 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Range);
01138 EXPECT_EQ(SizeOf(refs), 2);
01139
01140 ExpectHasBaseAttributes(ObjectId::Range);
01141 ExpectHasTypeAttributes(ObjectId::Range);
01142 }
01143
01144 TEST_F(StandardNamespaceStructure, StructureSamplingIntervalDiagnosticsDataType)
01145 {
01146 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsDataType);
01147 EXPECT_EQ(SizeOf(refs), 0);
01148
01149 ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsDataType);
01150 ExpectHasTypeAttributes(ObjectId::SamplingIntervalDiagnosticsDataType);
01151 }
01152
01153 TEST_F(StandardNamespaceStructure, StructureSemanticChangeStructureDataType)
01154 {
01155 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SemanticChangeStructureDataType);
01156 EXPECT_EQ(SizeOf(refs), 0);
01157
01158 ExpectHasBaseAttributes(ObjectId::SemanticChangeStructureDataType);
01159 ExpectHasTypeAttributes(ObjectId::SemanticChangeStructureDataType);
01160 }
01161
01162 TEST_F(StandardNamespaceStructure, StructureServerDiagnosticsSummaryType)
01163 {
01164 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsSummaryType);
01165 EXPECT_EQ(SizeOf(refs), 0);
01166
01167 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsSummaryType);
01168 ExpectHasTypeAttributes(ObjectId::ServerDiagnosticsSummaryType);
01169 }
01170
01171 TEST_F(StandardNamespaceStructure, StructureServerStatusDataType)
01172 {
01173 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusDataType);
01174 EXPECT_EQ(SizeOf(refs), 0);
01175
01176 ExpectHasBaseAttributes(ObjectId::ServerStatusDataType);
01177 ExpectHasTypeAttributes(ObjectId::ServerStatusDataType);
01178 }
01179
01180 TEST_F(StandardNamespaceStructure, StructureServiceCounterDataType)
01181 {
01182 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServiceCounterDataType);
01183 EXPECT_EQ(SizeOf(refs), 0);
01184
01185 ExpectHasBaseAttributes(ObjectId::ServiceCounterDataType);
01186 ExpectHasTypeAttributes(ObjectId::ServiceCounterDataType);
01187 }
01188
01189 TEST_F(StandardNamespaceStructure, StructureSessionDiagnosticsDataType)
01190 {
01191 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionDiagnosticsDataType);
01192 EXPECT_EQ(SizeOf(refs), 0);
01193
01194 ExpectHasBaseAttributes(ObjectId::SessionDiagnosticsDataType);
01195 ExpectHasTypeAttributes(ObjectId::SessionDiagnosticsDataType);
01196 }
01197
01198 TEST_F(StandardNamespaceStructure, StructureSessionSecurityDiagnosticsDataType)
01199 {
01200 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsDataType);
01201 EXPECT_EQ(SizeOf(refs), 0);
01202
01203 ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsDataType);
01204 ExpectHasTypeAttributes(ObjectId::SessionSecurityDiagnosticsDataType);
01205 }
01206
01207 TEST_F(StandardNamespaceStructure, StructureSignedSoftwareCertificate)
01208 {
01209 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SignedSoftwareCertificate);
01210 EXPECT_EQ(SizeOf(refs), 0);
01211
01212 ExpectHasBaseAttributes(ObjectId::SignedSoftwareCertificate);
01213 ExpectHasTypeAttributes(ObjectId::SignedSoftwareCertificate);
01214 }
01215
01216 TEST_F(StandardNamespaceStructure, StructureStatusResult)
01217 {
01218 const std::vector<ReferenceDescription> refs = Browse(ObjectId::StatusResult);
01219 EXPECT_EQ(SizeOf(refs), 0);
01220
01221 ExpectHasBaseAttributes(ObjectId::StatusResult);
01222 ExpectHasTypeAttributes(ObjectId::StatusResult);
01223 }
01224
01225 TEST_F(StandardNamespaceStructure, StructureSubscriptionDiagnosticsDataType)
01226 {
01227 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsDataType);
01228 EXPECT_EQ(SizeOf(refs), 0);
01229
01230 ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsDataType);
01231 ExpectHasTypeAttributes(ObjectId::SubscriptionDiagnosticsDataType);
01232 }
01233
01234 TEST_F(StandardNamespaceStructure, StructureUserIdentifyToken)
01235 {
01236 const std::vector<ReferenceDescription> refs = Browse(ObjectId::UserIdentityToken);
01237 EXPECT_EQ(SizeOf(refs), 3);
01238 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::AnonymousIdentityToken));
01239 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::UserNameIdentityToken));
01240 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::X509IdentityToken));
01241
01242 ExpectHasBaseAttributes(ObjectId::UserIdentityToken);
01243 ExpectHasTypeAttributes(ObjectId::UserIdentityToken);
01244 }
01245
01246 TEST_F(StandardNamespaceStructure, XmlElement)
01247 {
01248 const std::vector<ReferenceDescription> refs = Browse(ObjectId::XmlElement);
01249 EXPECT_EQ(SizeOf(refs), 0);
01250
01251 ExpectHasBaseAttributes(ObjectId::XmlElement);
01252 ExpectHasTypeAttributes(ObjectId::XmlElement);
01253 }
01254
01255 TEST_F(StandardNamespaceStructure, EventTypes)
01256 {
01257 const std::vector<ReferenceDescription> refs = Browse(ObjectId::EventTypesFolder);
01258 EXPECT_EQ(SizeOf(refs), 2);
01259 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::BaseEventType));
01260 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
01261
01262 ExpectHasBaseAttributes(ObjectId::EventTypesFolder);
01263 }
01264
01265 TEST_F(StandardNamespaceStructure, BaseEventType)
01266 {
01267 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType);
01268 EXPECT_EQ(SizeOf(refs), 11);
01269 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::BaseModelChangeEventType));
01270 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SemanticChangeEventType));
01271 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SystemEventType));
01272 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_EventId));
01273 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_EventType));
01274 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Message));
01275 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_ReceiveTime));
01276 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Severity));
01277 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_SourceName));
01278 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_SourceNode));
01279 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::BaseEventType_Time));
01280
01281 ExpectHasBaseAttributes(ObjectId::BaseEventType);
01282 ExpectHasTypeAttributes(ObjectId::BaseEventType);
01283 }
01284
01285 TEST_F(StandardNamespaceStructure, BaseModelChangeEventType)
01286 {
01287 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseModelChangeEventType);
01288 EXPECT_EQ(SizeOf(refs), 0);
01289
01290 ExpectHasBaseAttributes(ObjectId::BaseModelChangeEventType);
01291 ExpectHasTypeAttributes(ObjectId::BaseModelChangeEventType);
01292 }
01293
01294 TEST_F(StandardNamespaceStructure, SemanticChangeEventType)
01295 {
01296 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SemanticChangeEventType);
01297 EXPECT_EQ(SizeOf(refs), 0);
01298
01299 ExpectHasBaseAttributes(ObjectId::SemanticChangeEventType);
01300 ExpectHasTypeAttributes(ObjectId::SemanticChangeEventType);
01301 }
01302
01303 TEST_F(StandardNamespaceStructure, SystemEventType)
01304 {
01305 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SystemEventType);
01306 EXPECT_EQ(SizeOf(refs), 4);
01307 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DeviceFailureEventType));
01308 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::RefreshEndEventType));
01309 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::RefreshRequiredEventType));
01310 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::RefreshStartEventType));
01311
01312 ExpectHasBaseAttributes(ObjectId::SystemEventType);
01313 ExpectHasTypeAttributes(ObjectId::SystemEventType);
01314 }
01315
01316 TEST_F(StandardNamespaceStructure, DeviceFailureEventType)
01317 {
01318 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DeviceFailureEventType);
01319 EXPECT_EQ(SizeOf(refs), 0);
01320
01321 ExpectHasBaseAttributes(ObjectId::DeviceFailureEventType);
01322 ExpectHasTypeAttributes(ObjectId::DeviceFailureEventType);
01323 }
01324
01325 TEST_F(StandardNamespaceStructure, RefreshEndEventType)
01326 {
01327 const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshEndEventType);
01328 EXPECT_EQ(SizeOf(refs), 0);
01329
01330 ExpectHasBaseAttributes(ObjectId::RefreshEndEventType);
01331 ExpectHasTypeAttributes(ObjectId::RefreshEndEventType);
01332 }
01333
01334 TEST_F(StandardNamespaceStructure, RefreshRequiredEventType)
01335 {
01336 const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshRequiredEventType);
01337 EXPECT_EQ(SizeOf(refs), 0);
01338
01339 ExpectHasBaseAttributes(ObjectId::RefreshRequiredEventType);
01340 ExpectHasTypeAttributes(ObjectId::RefreshRequiredEventType);
01341 }
01342
01343 TEST_F(StandardNamespaceStructure, RefreshStartEventType)
01344 {
01345 const std::vector<ReferenceDescription> refs = Browse(ObjectId::RefreshStartEventType);
01346 EXPECT_EQ(SizeOf(refs), 0);
01347
01348 ExpectHasBaseAttributes(ObjectId::RefreshStartEventType);
01349 ExpectHasTypeAttributes(ObjectId::RefreshStartEventType);
01350 }
01351
01352 TEST_F(StandardNamespaceStructure, EventId)
01353 {
01354 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_EventId);
01355 EXPECT_EQ(SizeOf(refs), 2);
01356 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01357 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01358
01359 ExpectHasBaseAttributes(ObjectId::BaseEventType_EventId);
01360 ExpectHasVariableAttributes(ObjectId::BaseEventType_EventId);
01361 }
01362
01363 TEST_F(StandardNamespaceStructure, EventType)
01364 {
01365 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_EventType);
01366 EXPECT_EQ(SizeOf(refs), 2);
01367 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01368 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01369
01370 ExpectHasBaseAttributes(ObjectId::BaseEventType_EventType);
01371 ExpectHasVariableAttributes(ObjectId::BaseEventType_EventType);
01372 }
01373
01374 TEST_F(StandardNamespaceStructure, Message)
01375 {
01376 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Message);
01377 EXPECT_EQ(SizeOf(refs), 2);
01378 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01379 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01380
01381 ExpectHasBaseAttributes(ObjectId::BaseEventType_Message);
01382 ExpectHasVariableAttributes(ObjectId::BaseEventType_Message);
01383 }
01384
01385 TEST_F(StandardNamespaceStructure, ReceiveTime)
01386 {
01387 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_ReceiveTime);
01388 EXPECT_EQ(SizeOf(refs), 2);
01389 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01390 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01391
01392 ExpectHasBaseAttributes(ObjectId::BaseEventType_ReceiveTime);
01393 ExpectHasVariableAttributes(ObjectId::BaseEventType_ReceiveTime);
01394 }
01395
01396 TEST_F(StandardNamespaceStructure, Severity)
01397 {
01398 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Severity);
01399 EXPECT_EQ(SizeOf(refs), 2);
01400 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01401 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01402
01403 ExpectHasBaseAttributes(ObjectId::BaseEventType_Severity);
01404 ExpectHasVariableAttributes(ObjectId::BaseEventType_Severity);
01405 }
01406
01407 TEST_F(StandardNamespaceStructure, SourceName)
01408 {
01409 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_SourceName);
01410 EXPECT_EQ(SizeOf(refs), 2);
01411 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01412 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01413
01414 ExpectHasBaseAttributes(ObjectId::BaseEventType_SourceName);
01415 ExpectHasVariableAttributes(ObjectId::BaseEventType_SourceName);
01416 }
01417
01418 TEST_F(StandardNamespaceStructure, SourceNode)
01419 {
01420 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_SourceNode);
01421 EXPECT_EQ(SizeOf(refs), 2);
01422 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01423 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01424
01425 ExpectHasBaseAttributes(ObjectId::BaseEventType_SourceNode);
01426 ExpectHasVariableAttributes(ObjectId::BaseEventType_SourceNode);
01427 }
01428
01429 TEST_F(StandardNamespaceStructure, Time)
01430 {
01431 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseEventType_Time);
01432 EXPECT_EQ(SizeOf(refs), 2);
01433 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01434 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01435
01436 ExpectHasBaseAttributes(ObjectId::BaseEventType_Time);
01437 ExpectHasVariableAttributes(ObjectId::BaseEventType_Time);
01438 }
01439
01440 TEST_F(StandardNamespaceStructure, ObjectTypes)
01441 {
01442 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ObjectTypesFolder);
01443 EXPECT_EQ(SizeOf(refs), 2);
01444 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
01445 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::BaseObjectType));
01446
01447 ExpectHasBaseAttributes(ObjectId::ObjectTypesFolder);
01448 }
01449
01450 TEST_F(StandardNamespaceStructure, BaseObjectType)
01451 {
01452 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseObjectType);
01453 EXPECT_EQ(SizeOf(refs), 24);
01454 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::BaseEventType));
01455 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DataTypeEncodingType));
01456 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DataTypeSystemType));
01457 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::FolderType));
01458
01459 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ModellingRuleType));
01460 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerCapabilitiesType));
01461 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerDiagnosticsType));
01462 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerRedundancyType));
01463 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerType));
01464 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsObjectType));
01465 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionsDiagnosticsSummaryType));
01466 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::StateType));
01467 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::TransitionType));
01468 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::VendorServerInfoType));
01469
01470 ExpectHasBaseAttributes(ObjectId::BaseObjectType);
01471 ExpectHasTypeAttributes(ObjectId::BaseObjectType);
01472 }
01473
01474 TEST_F(StandardNamespaceStructure, DataTypeEncodingType)
01475 {
01476 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeEncodingType);
01477 EXPECT_EQ(SizeOf(refs), 0);
01478
01479 ExpectHasBaseAttributes(ObjectId::DataTypeEncodingType);
01480 ExpectHasTypeAttributes(ObjectId::DataTypeEncodingType);
01481 }
01482
01483 TEST_F(StandardNamespaceStructure, DataTypeSystemType)
01484 {
01485 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeSystemType);
01486 EXPECT_EQ(SizeOf(refs), 0);
01487
01488 ExpectHasBaseAttributes(ObjectId::DataTypeSystemType);
01489 ExpectHasTypeAttributes(ObjectId::DataTypeSystemType);
01490 }
01491
01492 TEST_F(StandardNamespaceStructure, FolderType)
01493 {
01494 const std::vector<ReferenceDescription> refs = Browse(ObjectId::FolderType);
01495 EXPECT_EQ(SizeOf(refs), 0);
01496
01497 ExpectHasBaseAttributes(ObjectId::FolderType);
01498 ExpectHasTypeAttributes(ObjectId::FolderType);
01499 }
01500
01501
01502
01503
01504
01505
01506
01507
01508
01509
01510 TEST_F(StandardNamespaceStructure, ModellingRuleType)
01511 {
01512 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRuleType);
01513 EXPECT_EQ(SizeOf(refs), 1);
01514 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ModellingRuleType_NamingRule));
01515
01516 ExpectHasBaseAttributes(ObjectId::ModellingRuleType);
01517 ExpectHasTypeAttributes(ObjectId::ModellingRuleType);
01518 }
01519
01520 TEST_F(StandardNamespaceStructure, NamingRule)
01521 {
01522 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ModellingRuleType_NamingRule);
01523 EXPECT_EQ(SizeOf(refs), 1);
01524 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01525
01526 ExpectHasBaseAttributes(ObjectId::ModellingRuleType_NamingRule);
01527 ExpectHasVariableAttributes(ObjectId::ModellingRuleType_NamingRule);
01528 }
01529
01530 TEST_F(StandardNamespaceStructure, ServerCapabilitiesType)
01531 {
01532 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType);
01533 EXPECT_EQ(SizeOf(refs), 13);
01534 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_LocaleIdArray));
01535 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints));
01536 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints));
01537 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_MinSupportedSampleRate));
01538 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerCapabilitiesType_ModellingRules));
01539 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerCapabilitiesType_ServerProfileArray));
01540
01541 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType);
01542 ExpectHasTypeAttributes(ObjectId::ServerCapabilitiesType);
01543 }
01544
01545 TEST_F(StandardNamespaceStructure, ModellingRules)
01546 {
01547 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_ModellingRules);
01548 EXPECT_EQ(SizeOf(refs), 2);
01549 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
01550 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01551
01552 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_ModellingRules);
01553 }
01554
01555 TEST_F(StandardNamespaceStructure, LocaleIdArray)
01556 {
01557 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_LocaleIdArray);
01558 EXPECT_EQ(SizeOf(refs), 2);
01559 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01560 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01561
01562 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_LocaleIdArray);
01563 ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_LocaleIdArray);
01564 }
01565
01566 TEST_F(StandardNamespaceStructure, MaxBrowseContinuationPoints)
01567 {
01568 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
01569 EXPECT_EQ(SizeOf(refs), 2);
01570 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01571 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01572
01573 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
01574 ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MaxBrowseContinuationPoints);
01575 }
01576
01577 TEST_F(StandardNamespaceStructure, MaxHistoryContinuationPoints)
01578 {
01579 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
01580 EXPECT_EQ(SizeOf(refs), 2);
01581 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01582 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01583
01584 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
01585 ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MaxHistoryContinuationPoints);
01586 }
01587
01588 TEST_F(StandardNamespaceStructure, MinSupportedSampleRate)
01589 {
01590 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
01591 EXPECT_EQ(SizeOf(refs), 2);
01592 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01593 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01594
01595 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
01596 ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_MinSupportedSampleRate);
01597 }
01598
01599 TEST_F(StandardNamespaceStructure, ServerProfileArray)
01600 {
01601 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerCapabilitiesType_ServerProfileArray);
01602 EXPECT_EQ(SizeOf(refs), 2);
01603 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01604 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01605
01606 ExpectHasBaseAttributes(ObjectId::ServerCapabilitiesType_ServerProfileArray);
01607 ExpectHasVariableAttributes(ObjectId::ServerCapabilitiesType_ServerProfileArray);
01608 }
01609
01610 TEST_F(StandardNamespaceStructure, ServerDiagnosticsType)
01611 {
01612 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType);
01613 EXPECT_EQ(SizeOf(refs), 5);
01614 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_EnabledFlag));
01615 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary));
01616 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray));
01617 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray));
01618 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerDiagnosticsType_SessionsDiagnosticsSummary));
01619
01620 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType);
01621 ExpectHasTypeAttributes(ObjectId::ServerDiagnosticsType);
01622 }
01623
01624 TEST_F(StandardNamespaceStructure, EnableFlag)
01625 {
01626 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_EnabledFlag);
01627 EXPECT_EQ(SizeOf(refs), 2);
01628 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01629 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01630
01631 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_EnabledFlag);
01632 ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_EnabledFlag);
01633 }
01634
01635 TEST_F(StandardNamespaceStructure, SamplingIntervalDiagnosticsArray)
01636 {
01637 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
01638 EXPECT_EQ(SizeOf(refs), 2);
01639 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SamplingIntervalDiagnosticsArrayType));
01640 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01641
01642 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
01643 ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_SamplingIntervalDiagnosticsArray);
01644 }
01645
01646 TEST_F(StandardNamespaceStructure, ServerDiagnosticsSummary)
01647 {
01648 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
01649 EXPECT_EQ(SizeOf(refs), 2);
01650 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerDiagnosticsSummaryType));
01651 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01652
01653 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
01654 ExpectHasVariableAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
01655 }
01656
01657 TEST_F(StandardNamespaceStructure, SessionDiagnosticsSummary)
01658 {
01659 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SessionsDiagnosticsSummary);
01660 EXPECT_EQ(SizeOf(refs), 2);
01661 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SessionsDiagnosticsSummaryType));
01662 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01663
01664 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_ServerDiagnosticsSummary);
01665 }
01666
01667 TEST_F(StandardNamespaceStructure, SubscriptionDiagnosticsArray)
01668 {
01669 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray);
01670 EXPECT_EQ(SizeOf(refs), 2);
01671 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::SubscriptionDiagnosticsArrayType));
01672 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01673
01674 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsType_SubscriptionDiagnosticsArray);
01675 }
01676
01677 TEST_F(StandardNamespaceStructure, ServerRedundancyType)
01678 {
01679 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerRedundancyType);
01680 EXPECT_EQ(SizeOf(refs), 1);
01681 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerRedundancyType_RedundancySupport));
01682
01683 ExpectHasBaseAttributes(ObjectId::ServerRedundancyType);
01684 ExpectHasTypeAttributes(ObjectId::ServerRedundancyType);
01685 }
01686
01687 TEST_F(StandardNamespaceStructure, RedundancySupportTypeRedundancySupport)
01688 {
01689 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerRedundancyType_RedundancySupport);
01690 EXPECT_EQ(SizeOf(refs), 1);
01691 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01692
01693 ExpectHasBaseAttributes(ObjectId::ServerRedundancyType_RedundancySupport);
01694 ExpectHasVariableAttributes(ObjectId::ServerRedundancyType_RedundancySupport);
01695 }
01696
01697 TEST_F(StandardNamespaceStructure, ServerType)
01698 {
01699 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType);
01700 EXPECT_EQ(SizeOf(refs), 8);
01701 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_NamespaceArray));
01702 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServerArray));
01703 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerCapabilities));
01704 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerDiagnostics));
01705 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_ServerRedundancy));
01706 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServerStatus));
01707 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::ServerType_ServiceLevel));
01708 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerType_VendorServerInfo));
01709
01710 ExpectHasBaseAttributes(ObjectId::ServerType);
01711 ExpectHasTypeAttributes(ObjectId::ServerType);
01712 }
01713
01714 TEST_F(StandardNamespaceStructure, NamespaceArray)
01715 {
01716 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_NamespaceArray);
01717 EXPECT_EQ(SizeOf(refs), 1);
01718 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01719
01720 ExpectHasBaseAttributes(ObjectId::ServerType_NamespaceArray);
01721 ExpectHasVariableAttributes(ObjectId::ServerType_NamespaceArray);
01722 }
01723
01724 TEST_F(StandardNamespaceStructure, ServerArray)
01725 {
01726 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerArray);
01727 EXPECT_EQ(SizeOf(refs), 1);
01728 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01729
01730 ExpectHasBaseAttributes(ObjectId::ServerType_ServerArray);
01731 ExpectHasVariableAttributes(ObjectId::ServerType_ServerArray);
01732 }
01733
01734 TEST_F(StandardNamespaceStructure, ServerCapabilities)
01735 {
01736 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerCapabilities);
01737 EXPECT_EQ(SizeOf(refs), 2);
01738 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerCapabilitiesType));
01739 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01740
01741 ExpectHasBaseAttributes(ObjectId::ServerType_ServerCapabilities);
01742 ExpectHasObjectAttributes(ObjectId::ServerType_ServerCapabilities);
01743 }
01744
01745 TEST_F(StandardNamespaceStructure, ServerDiagnostics)
01746 {
01747 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerDiagnostics);
01748 EXPECT_EQ(SizeOf(refs), 2);
01749 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerDiagnosticsType));
01750 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01751
01752 ExpectHasBaseAttributes(ObjectId::ServerType_ServerDiagnostics);
01753 ExpectHasObjectAttributes(ObjectId::ServerType_ServerDiagnostics);
01754 }
01755
01756 TEST_F(StandardNamespaceStructure, ServerRedundancy)
01757 {
01758 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerRedundancy);
01759 EXPECT_EQ(SizeOf(refs), 2);
01760 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerRedundancyType));
01761 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01762
01763 ExpectHasBaseAttributes(ObjectId::ServerType_ServerRedundancy);
01764 ExpectHasObjectAttributes(ObjectId::ServerType_ServerRedundancy);
01765 }
01766
01767 TEST_F(StandardNamespaceStructure, ServerStatus)
01768 {
01769 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServerStatus);
01770 EXPECT_EQ(SizeOf(refs), 2);
01771 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::ServerStatusType));
01772 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01773
01774 ExpectHasBaseAttributes(ObjectId::ServerType_ServerStatus);
01775 ExpectHasVariableAttributes(ObjectId::ServerType_ServerStatus);
01776 }
01777
01778 TEST_F(StandardNamespaceStructure, BuildInfoType)
01779 {
01780 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType);
01781 EXPECT_EQ(SizeOf(refs), 6);
01782 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_BuildDate));
01783 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_BuildNumber));
01784 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ManufacturerName));
01785 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ProductName));
01786 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_ProductUri));
01787 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::BuildInfoType_SoftwareVersion));
01788
01789 ExpectHasBaseAttributes(ObjectId::BuildInfoType);
01790 ExpectHasVariableTypeAttributes(ObjectId::BuildInfoType);
01791 }
01792
01793 TEST_F(StandardNamespaceStructure, BuildDate)
01794 {
01795 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_BuildDate);
01796 EXPECT_EQ(SizeOf(refs), 1);
01797 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01798
01799 ExpectHasBaseAttributes(ObjectId::BuildInfoType_BuildDate);
01800 ExpectHasVariableAttributes(ObjectId::BuildInfoType_BuildDate);
01801 }
01802
01803 TEST_F(StandardNamespaceStructure, BuildNumber)
01804 {
01805 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_BuildNumber);
01806 EXPECT_EQ(SizeOf(refs), 1);
01807 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01808
01809 ExpectHasBaseAttributes(ObjectId::BuildInfoType_BuildNumber);
01810 ExpectHasVariableAttributes(ObjectId::BuildInfoType_BuildNumber);
01811 }
01812
01813 TEST_F(StandardNamespaceStructure, ManufacturerName)
01814 {
01815 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ManufacturerName);
01816 EXPECT_EQ(SizeOf(refs), 1);
01817 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01818
01819 ExpectHasBaseAttributes(ObjectId::BuildInfoType_ManufacturerName);
01820 ExpectHasVariableAttributes(ObjectId::BuildInfoType_ManufacturerName);
01821 }
01822
01823 TEST_F(StandardNamespaceStructure, ProductName)
01824 {
01825 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ProductName);
01826 EXPECT_EQ(SizeOf(refs), 1);
01827 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01828
01829 ExpectHasBaseAttributes(ObjectId::BuildInfoType_ProductName);
01830 ExpectHasVariableAttributes(ObjectId::BuildInfoType_ProductName);
01831 }
01832
01833 TEST_F(StandardNamespaceStructure, ProductUri)
01834 {
01835 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_ProductUri);
01836 EXPECT_EQ(SizeOf(refs), 1);
01837 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01838
01839 ExpectHasBaseAttributes(ObjectId::BuildInfoType_ProductUri);
01840 ExpectHasVariableAttributes(ObjectId::BuildInfoType_ProductUri);
01841 }
01842
01843 TEST_F(StandardNamespaceStructure, SoftwareVersion)
01844 {
01845 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BuildInfoType_SoftwareVersion);
01846 EXPECT_EQ(SizeOf(refs), 1);
01847 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01848
01849 ExpectHasBaseAttributes(ObjectId::BuildInfoType_SoftwareVersion);
01850 ExpectHasVariableAttributes(ObjectId::BuildInfoType_SoftwareVersion);
01851 }
01852
01853 TEST_F(StandardNamespaceStructure, CurrentTime)
01854 {
01855 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_CurrentTime);
01856 EXPECT_EQ(SizeOf(refs), 1);
01857 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01858
01859 ExpectHasBaseAttributes(ObjectId::ServerStatusType_CurrentTime);
01860 ExpectHasVariableAttributes(ObjectId::ServerStatusType_CurrentTime);
01861 }
01862
01863 TEST_F(StandardNamespaceStructure, StartTime)
01864 {
01865 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_StartTime);
01866 EXPECT_EQ(SizeOf(refs), 1);
01867 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01868
01869 ExpectHasBaseAttributes(ObjectId::ServerStatusType_StartTime);
01870 ExpectHasVariableAttributes(ObjectId::ServerStatusType_StartTime);
01871 }
01872
01873 TEST_F(StandardNamespaceStructure, State)
01874 {
01875 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType_State);
01876 EXPECT_EQ(SizeOf(refs), 1);
01877 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::BaseDataVariableType));
01878
01879 ExpectHasBaseAttributes(ObjectId::ServerStatusType_State);
01880 ExpectHasVariableAttributes(ObjectId::ServerStatusType_State);
01881 }
01882
01883 TEST_F(StandardNamespaceStructure, ServiceLevel)
01884 {
01885 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_ServiceLevel);
01886 EXPECT_EQ(SizeOf(refs), 2);
01887 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01888 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01889
01890 ExpectHasBaseAttributes(ObjectId::ServerType_ServiceLevel);
01891 ExpectHasVariableAttributes(ObjectId::ServerType_ServiceLevel);
01892 }
01893
01894 TEST_F(StandardNamespaceStructure, VendorServerInfo)
01895 {
01896 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerType_VendorServerInfo);
01897 EXPECT_EQ(SizeOf(refs), 2);
01898 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::VendorServerInfoType));
01899 EXPECT_TRUE(HasReference(refs, ReferenceId::HasModellingRule, ObjectId::ModellingRule_Mandatory));
01900
01901 ExpectHasBaseAttributes(ObjectId::ServerType_VendorServerInfo);
01902 ExpectHasObjectAttributes(ObjectId::ServerType_VendorServerInfo);
01903 }
01904
01905 TEST_F(StandardNamespaceStructure, SessionDiagnosticsObjectType)
01906 {
01907 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionDiagnosticsObjectType);
01908 EXPECT_EQ(SizeOf(refs), 0);
01909
01910 ExpectHasBaseAttributes(ObjectId::SessionDiagnosticsObjectType);
01911 ExpectHasTypeAttributes(ObjectId::SessionDiagnosticsObjectType);
01912 }
01913
01914 TEST_F(StandardNamespaceStructure, SessionDiagnosticsSummaryType)
01915 {
01916 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionsDiagnosticsSummaryType);
01917 EXPECT_EQ(SizeOf(refs), 0);
01918
01919 ExpectHasBaseAttributes(ObjectId::SessionsDiagnosticsSummaryType);
01920 ExpectHasTypeAttributes(ObjectId::SessionsDiagnosticsSummaryType);
01921 }
01922
01923 TEST_F(StandardNamespaceStructure, StateType)
01924 {
01925 const std::vector<ReferenceDescription> refs = Browse(ObjectId::StateType);
01926 EXPECT_EQ(SizeOf(refs), 1);
01927 EXPECT_TRUE(HasReference(refs, ReferenceId::HasProperty, ObjectId::StateType_StateNumber));
01928
01929 ExpectHasBaseAttributes(ObjectId::StateType);
01930 ExpectHasTypeAttributes(ObjectId::StateType);
01931 }
01932
01933 TEST_F(StandardNamespaceStructure, StateNumber)
01934 {
01935 const std::vector<ReferenceDescription> refs = Browse(ObjectId::StateType_StateNumber);
01936 EXPECT_EQ(SizeOf(refs), 1);
01937 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::PropertyType));
01938
01939 ExpectHasBaseAttributes(ObjectId::StateType_StateNumber);
01940 ExpectHasVariableAttributes(ObjectId::StateType_StateNumber);
01941 }
01942
01943 TEST_F(StandardNamespaceStructure, TransitionType)
01944 {
01945 const std::vector<ReferenceDescription> refs = Browse(ObjectId::TransitionType);
01946 EXPECT_EQ(SizeOf(refs), 0);
01947
01948 ExpectHasBaseAttributes(ObjectId::TransitionType);
01949 ExpectHasTypeAttributes(ObjectId::TransitionType);
01950 }
01951
01952 TEST_F(StandardNamespaceStructure, VendorServerInfoType)
01953 {
01954 const std::vector<ReferenceDescription> refs = Browse(ObjectId::VendorServerInfoType);
01955 EXPECT_EQ(SizeOf(refs), 0);
01956
01957 ExpectHasBaseAttributes(ObjectId::VendorServerInfoType);
01958 ExpectHasTypeAttributes(ObjectId::VendorServerInfoType);
01959 }
01960
01961 TEST_F(StandardNamespaceStructure, ReferenceTypes)
01962 {
01963 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ReferenceTypesFolder);
01964 EXPECT_EQ(SizeOf(refs), 2);
01965 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
01966 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::References));
01967
01968 ExpectHasBaseAttributes(ObjectId::ReferenceTypesFolder);
01969 }
01970
01971 TEST_F(StandardNamespaceStructure, References)
01972 {
01973 const std::vector<ReferenceDescription> refs = Browse(ObjectId::References);
01974 EXPECT_EQ(SizeOf(refs), 2);
01975 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HierarchicalReferences));
01976 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::NonHierarchicalReferences));
01977
01978 ExpectHasReferenceTypeAttributes(ObjectId::References);
01979 EXPECT_FALSE(HasAttribute(ObjectId::HierarchicalReferences, AttributeId::InverseName));
01980 }
01981
01982 TEST_F(StandardNamespaceStructure, HierarchicalReferences)
01983 {
01984 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HierarchicalReferences);
01985 EXPECT_EQ(SizeOf(refs), 3);
01986 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasChild));
01987 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasEventSource));
01988 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Organizes));
01989
01990 ExpectHasReferenceTypeAttributes(ObjectId::HierarchicalReferences);
01991 EXPECT_FALSE(HasAttribute(ObjectId::HierarchicalReferences, AttributeId::InverseName));
01992 }
01993
01994 TEST_F(StandardNamespaceStructure, HasChild)
01995 {
01996 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasChild);
01997 EXPECT_EQ(SizeOf(refs), 2);
01998 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasSubtype));
01999 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::Aggregates));
02000
02001 ExpectHasReferenceTypeAttributes(ObjectId::HasChild);
02002 EXPECT_FALSE(HasAttribute(ObjectId::HasChild, AttributeId::InverseName));
02003 }
02004
02005 TEST_F(StandardNamespaceStructure, Aggregates)
02006 {
02007 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Aggregates);
02008 EXPECT_EQ(SizeOf(refs), 3);
02009 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasHistoricalConfiguration));
02010 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasComponent));
02011 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasProperty));
02012
02013 ExpectHasReferenceTypeAttributes(ObjectId::Aggregates);
02014 EXPECT_FALSE(HasAttribute(ObjectId::Aggregates, AttributeId::InverseName));
02015 }
02016
02017 TEST_F(StandardNamespaceStructure, HasComponent)
02018 {
02019 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasComponent);
02020 EXPECT_EQ(SizeOf(refs), 1);
02021 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasOrderedComponent));
02022
02023 ExpectHasReferenceTypeAttributes(ObjectId::HasComponent);
02024 EXPECT_TRUE(HasAttribute(ObjectId::HasComponent, AttributeId::InverseName));
02025 }
02026
02027 TEST_F(StandardNamespaceStructure, HasOrderedComponent)
02028 {
02029 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasOrderedComponent);
02030 EXPECT_EQ(SizeOf(refs), 0);
02031
02032 ExpectHasReferenceTypeAttributes(ObjectId::HasOrderedComponent);
02033 EXPECT_TRUE(HasAttribute(ObjectId::HasOrderedComponent, AttributeId::InverseName));
02034 }
02035
02036 TEST_F(StandardNamespaceStructure, HasHistoricalConfiguration)
02037 {
02038 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasHistoricalConfiguration);
02039 EXPECT_EQ(SizeOf(refs), 0);
02040
02041 ExpectHasReferenceTypeAttributes(ObjectId::HasHistoricalConfiguration);
02042 EXPECT_TRUE(HasAttribute(ObjectId::HasHistoricalConfiguration, AttributeId::InverseName));
02043 }
02044
02045 TEST_F(StandardNamespaceStructure, HasProperty)
02046 {
02047 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasProperty);
02048 EXPECT_EQ(SizeOf(refs), 0);
02049
02050 ExpectHasReferenceTypeAttributes(ObjectId::HasProperty);
02051 EXPECT_TRUE(HasAttribute(ObjectId::HasProperty, AttributeId::InverseName));
02052 }
02053
02054 TEST_F(StandardNamespaceStructure, HasSubtype)
02055 {
02056 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasSubtype);
02057 EXPECT_EQ(SizeOf(refs), 0);
02058
02059 ExpectHasReferenceTypeAttributes(ObjectId::HasSubtype);
02060 EXPECT_TRUE(HasAttribute(ObjectId::HasSubtype, AttributeId::InverseName));
02061 }
02062
02063 TEST_F(StandardNamespaceStructure, HasEventSource)
02064 {
02065 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEventSource);
02066 EXPECT_EQ(SizeOf(refs), 1);
02067 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasNotifier));
02068
02069 ExpectHasReferenceTypeAttributes(ObjectId::HasEventSource);
02070 EXPECT_TRUE(HasAttribute(ObjectId::HasEventSource, AttributeId::InverseName));
02071 }
02072
02073 TEST_F(StandardNamespaceStructure, HasNotifier)
02074 {
02075 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasNotifier);
02076 EXPECT_EQ(SizeOf(refs), 0);
02077
02078 ExpectHasReferenceTypeAttributes(ObjectId::HasNotifier);
02079 EXPECT_TRUE(HasAttribute(ObjectId::HasNotifier, AttributeId::InverseName));
02080 }
02081
02082 TEST_F(StandardNamespaceStructure, Organizes)
02083 {
02084 const std::vector<ReferenceDescription> refs = Browse(ObjectId::Organizes);
02085 EXPECT_EQ(SizeOf(refs), 0);
02086
02087 ExpectHasReferenceTypeAttributes(ObjectId::Organizes);
02088 EXPECT_TRUE(HasAttribute(ObjectId::Organizes, AttributeId::InverseName));
02089 }
02090
02091 TEST_F(StandardNamespaceStructure, NonHierarchicalReferences)
02092 {
02093 const std::vector<ReferenceDescription> refs = Browse(ObjectId::NonHierarchicalReferences);
02094 EXPECT_EQ(SizeOf(refs), 10-1);
02095 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::FromState));
02096 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::GeneratesEvent));
02097 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasCause));
02098 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasDescription));
02099 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasEffect));
02100 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasEncoding));
02101
02102 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasModellingRule));
02103 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::HasTypeDefinition));
02104 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ToState));
02105
02106 ExpectHasReferenceTypeAttributes(ObjectId::NonHierarchicalReferences);
02107 EXPECT_FALSE(HasAttribute(ObjectId::NonHierarchicalReferences, AttributeId::InverseName));
02108 }
02109
02110 TEST_F(StandardNamespaceStructure, FromState)
02111 {
02112 const std::vector<ReferenceDescription> refs = Browse(ObjectId::FromState);
02113 EXPECT_EQ(SizeOf(refs), 0);
02114
02115 ExpectHasReferenceTypeAttributes(ObjectId::FromState);
02116 EXPECT_TRUE(HasAttribute(ObjectId::FromState, AttributeId::InverseName));
02117 }
02118
02119 TEST_F(StandardNamespaceStructure, GeneratesEvent)
02120 {
02121 const std::vector<ReferenceDescription> refs = Browse(ObjectId::GeneratesEvent);
02122 EXPECT_EQ(SizeOf(refs), 0);
02123
02124 ExpectHasReferenceTypeAttributes(ObjectId::GeneratesEvent);
02125 EXPECT_TRUE(HasAttribute(ObjectId::GeneratesEvent, AttributeId::InverseName));
02126 }
02127
02128 TEST_F(StandardNamespaceStructure, HasCause)
02129 {
02130 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasCause);
02131 EXPECT_EQ(SizeOf(refs), 0);
02132
02133 ExpectHasReferenceTypeAttributes(ObjectId::HasCause);
02134 EXPECT_TRUE(HasAttribute(ObjectId::HasCause, AttributeId::InverseName));
02135 }
02136
02137 TEST_F(StandardNamespaceStructure, HasDescription)
02138 {
02139 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasDescription);
02140 EXPECT_EQ(SizeOf(refs), 0);
02141
02142 ExpectHasReferenceTypeAttributes(ObjectId::HasDescription);
02143 EXPECT_TRUE(HasAttribute(ObjectId::HasDescription, AttributeId::InverseName));
02144 }
02145
02146 TEST_F(StandardNamespaceStructure, HasEffect)
02147 {
02148 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEffect);
02149 EXPECT_EQ(SizeOf(refs), 0);
02150
02151 ExpectHasReferenceTypeAttributes(ObjectId::HasEffect);
02152 EXPECT_TRUE(HasAttribute(ObjectId::HasEffect, AttributeId::InverseName));
02153 }
02154
02155 TEST_F(StandardNamespaceStructure, HasEncoding)
02156 {
02157 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasEncoding);
02158 EXPECT_EQ(SizeOf(refs), 0);
02159
02160 ExpectHasReferenceTypeAttributes(ObjectId::HasEncoding);
02161 EXPECT_TRUE(HasAttribute(ObjectId::HasEncoding, AttributeId::InverseName));
02162 }
02163
02164
02165
02166
02167
02168
02169
02170
02171
02172
02173 TEST_F(StandardNamespaceStructure, HasModellingRule)
02174 {
02175 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasModellingRule);
02176 EXPECT_EQ(SizeOf(refs), 0);
02177
02178 ExpectHasReferenceTypeAttributes(ObjectId::HasModellingRule);
02179 EXPECT_TRUE(HasAttribute(ObjectId::HasModellingRule, AttributeId::InverseName));
02180 }
02181
02182 TEST_F(StandardNamespaceStructure, HasTypeDefinition)
02183 {
02184 const std::vector<ReferenceDescription> refs = Browse(ObjectId::HasTypeDefinition);
02185 EXPECT_EQ(SizeOf(refs), 0);
02186
02187 ExpectHasReferenceTypeAttributes(ObjectId::HasTypeDefinition);
02188 EXPECT_TRUE(HasAttribute(ObjectId::HasTypeDefinition, AttributeId::InverseName));
02189 }
02190
02191 TEST_F(StandardNamespaceStructure, ToState)
02192 {
02193 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ToState);
02194 EXPECT_EQ(SizeOf(refs), 0);
02195
02196 ExpectHasReferenceTypeAttributes(ObjectId::ToState);
02197 EXPECT_TRUE(HasAttribute(ObjectId::ToState, AttributeId::InverseName));
02198 }
02199
02200 TEST_F(StandardNamespaceStructure, VariableTypes)
02201 {
02202 const std::vector<ReferenceDescription> refs = Browse(ObjectId::VariableTypesFolder);
02203 EXPECT_EQ(SizeOf(refs), 2);
02204 EXPECT_TRUE(HasReference(refs, ReferenceId::HasTypeDefinition, ObjectId::FolderType));
02205 EXPECT_TRUE(HasReference(refs, ReferenceId::Organizes, ObjectId::BaseVariableType));
02206
02207 ExpectHasBaseAttributes(ObjectId::VariableTypesFolder);
02208 }
02209
02210 TEST_F(StandardNamespaceStructure, BaseVariableType)
02211 {
02212 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseVariableType);
02213 EXPECT_EQ(SizeOf(refs), 2);
02214 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::BaseDataVariableType));
02215 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::PropertyType));
02216
02217 ExpectHasBaseAttributes(ObjectId::BaseVariableType);
02218 ExpectHasVariableTypeAttributes(ObjectId::BaseVariableType);
02219 }
02220
02221 TEST_F(StandardNamespaceStructure, BaseDataVariableType)
02222 {
02223 const std::vector<ReferenceDescription> refs = Browse(ObjectId::BaseDataVariableType);
02224 EXPECT_EQ(SizeOf(refs), 14);
02225 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::BuildInfoType));
02226 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DataTypeDescriptionType));
02227 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::DataTypeDictionaryType));
02228 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SamplingIntervalDiagnosticsArrayType));
02229 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SamplingIntervalDiagnosticsType));
02230 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerDiagnosticsSummaryType));
02231 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerStatusType));
02232 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::ServerVendorCapabilityType));
02233 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsArrayType));
02234 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionDiagnosticsVariableType));
02235 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionSecurityDiagnosticsArrayType));
02236 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SessionSecurityDiagnosticsType));
02237 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SubscriptionDiagnosticsArrayType));
02238 EXPECT_TRUE(HasReference(refs, ReferenceId::HasSubtype, ObjectId::SubscriptionDiagnosticsType));
02239
02240 ExpectHasBaseAttributes(ObjectId::BaseDataVariableType);
02241 ExpectHasVariableTypeAttributes(ObjectId::BaseDataVariableType);
02242 }
02243
02244 TEST_F(StandardNamespaceStructure, DataTypeDescriptionType)
02245 {
02246 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeDescriptionType);
02247 EXPECT_EQ(SizeOf(refs), 0);
02248
02249 ExpectHasBaseAttributes(ObjectId::DataTypeDescriptionType);
02250 ExpectHasVariableTypeAttributes(ObjectId::DataTypeDescriptionType);
02251 }
02252
02253 TEST_F(StandardNamespaceStructure, DataTypeDictionaryType)
02254 {
02255 const std::vector<ReferenceDescription> refs = Browse(ObjectId::DataTypeDictionaryType);
02256 EXPECT_EQ(SizeOf(refs), 0);
02257
02258 ExpectHasBaseAttributes(ObjectId::DataTypeDictionaryType);
02259 ExpectHasVariableTypeAttributes(ObjectId::DataTypeDictionaryType);
02260 }
02261
02262 TEST_F(StandardNamespaceStructure, SamplingIntervalDiagnosticsArrayType)
02263 {
02264 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsArrayType);
02265 EXPECT_EQ(SizeOf(refs), 0);
02266
02267 ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsArrayType);
02268 ExpectHasVariableTypeAttributes(ObjectId::SamplingIntervalDiagnosticsArrayType);
02269 }
02270
02271 TEST_F(StandardNamespaceStructure, SamplingIntervalDiagnosticsType)
02272 {
02273 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SamplingIntervalDiagnosticsType);
02274 EXPECT_EQ(SizeOf(refs), 0);
02275
02276 ExpectHasBaseAttributes(ObjectId::SamplingIntervalDiagnosticsType);
02277 ExpectHasVariableTypeAttributes(ObjectId::SamplingIntervalDiagnosticsType);
02278 }
02279
02280 TEST_F(StandardNamespaceStructure, ServerDiagnosticsSummaryDataType)
02281 {
02282 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerDiagnosticsSummaryDataType);
02283 EXPECT_EQ(SizeOf(refs), 0);
02284
02285 ExpectHasBaseAttributes(ObjectId::ServerDiagnosticsSummaryDataType);
02286 ExpectHasDataTypeAttributes(ObjectId::ServerDiagnosticsSummaryDataType);
02287 }
02288
02289 TEST_F(StandardNamespaceStructure, ServerStatusType)
02290 {
02291 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerStatusType);
02292 EXPECT_EQ(SizeOf(refs), 4);
02293 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_StartTime));
02294 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_CurrentTime));
02295 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_State));
02296 EXPECT_TRUE(HasReference(refs, ReferenceId::HasComponent, ObjectId::ServerStatusType_BuildInfo));
02297
02298 ExpectHasBaseAttributes(ObjectId::ServerStatusType);
02299 ExpectHasVariableTypeAttributes(ObjectId::ServerStatusType);
02300 }
02301
02302 TEST_F(StandardNamespaceStructure, ServerVendorCapabilityType)
02303 {
02304 const std::vector<ReferenceDescription> refs = Browse(ObjectId::ServerVendorCapabilityType);
02305 EXPECT_EQ(SizeOf(refs), 0);
02306
02307 ExpectHasBaseAttributes(ObjectId::ServerVendorCapabilityType);
02308 ExpectHasVariableTypeAttributes(ObjectId::ServerVendorCapabilityType);
02309 }
02310
02311 TEST_F(StandardNamespaceStructure, DISABLED_SessionsDiagnosticsArrayType)
02312 {
02313
02314
02315
02316
02317
02318 }
02319
02320 TEST_F(StandardNamespaceStructure, DISABLED_ServerDiagnosticsVariableType)
02321 {
02322
02323
02324
02325
02326
02327 }
02328
02329 TEST_F(StandardNamespaceStructure, SessionSecurityDiagnosticsArrayType)
02330 {
02331 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsArrayType);
02332 EXPECT_EQ(SizeOf(refs), 0);
02333
02334 ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsArrayType);
02335 ExpectHasVariableTypeAttributes(ObjectId::SessionSecurityDiagnosticsArrayType);
02336 }
02337
02338 TEST_F(StandardNamespaceStructure, SessionSecurityDiagnosticsType)
02339 {
02340 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SessionSecurityDiagnosticsType);
02341 EXPECT_EQ(SizeOf(refs), 0);
02342
02343 ExpectHasBaseAttributes(ObjectId::SessionSecurityDiagnosticsType);
02344 ExpectHasVariableTypeAttributes(ObjectId::SessionSecurityDiagnosticsType);
02345 }
02346
02347 TEST_F(StandardNamespaceStructure, SubscriptionDiagnosticsArrayType)
02348 {
02349 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsArrayType);
02350 EXPECT_EQ(SizeOf(refs), 0);
02351
02352 ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsArrayType);
02353 ExpectHasVariableTypeAttributes(ObjectId::SubscriptionDiagnosticsArrayType);
02354 }
02355
02356 TEST_F(StandardNamespaceStructure, SubscriptionDiagnosticsType)
02357 {
02358 const std::vector<ReferenceDescription> refs = Browse(ObjectId::SubscriptionDiagnosticsType);
02359 EXPECT_EQ(SizeOf(refs), 0);
02360
02361 ExpectHasBaseAttributes(ObjectId::SubscriptionDiagnosticsType);
02362 ExpectHasVariableTypeAttributes(ObjectId::SubscriptionDiagnosticsType);
02363 }
02364
02365 TEST_F(StandardNamespaceStructure, PropertyType)
02366 {
02367 const std::vector<ReferenceDescription> refs = Browse(ObjectId::PropertyType);
02368 EXPECT_EQ(SizeOf(refs), 0);
02369
02370 ExpectHasBaseAttributes(ObjectId::PropertyType);
02371 ExpectHasVariableTypeAttributes(ObjectId::PropertyType);
02372 }