public void OpcUaNodeSet2TestMethod() { FileInfo _testDataFileInfo = new FileInfo(@"XMLModels\CorrectModels\ReferenceTest\ReferenceTest.NodeSet2.xml"); Assert.IsTrue(_testDataFileInfo.Exists); UANodeSet _model = UANodeSet.ReadModellFile(_testDataFileInfo); Assert.IsNotNull(_model); }
/// <summary> /// Imports a part of the OPC UA Address Space contained in the file <see cref="FileInfo" />. /// </summary> /// <param name="model">The model to be imported.</param> /// <exception cref="System.IO.FileNotFoundException">The imported file does not exist</exception> void IAddressSpaceContext.ImportUANodeSet(FileInfo model) { m_TraceEvent(TraceMessage.DiagnosticTraceMessage("Entering AddressSpaceContextService.ImportUANodeSet - importing form file")); if (model == null) { throw new ArgumentNullException("model", "the model cannot be null"); } if (!model.Exists) { throw new FileNotFoundException("The imported file does not exist", model.FullName); } UANodeSet _nodeSet = UANodeSet.ReadModellFile(model); ImportNodeSet(_nodeSet); }