The base class for all tests.
コード例 #1
0
ファイル: TestBase.cs プロジェクト: zryska/UA-.NET
        /// <summary>
        /// Initializes the test with session, configuration and logger.
        /// </summary>
        public TestBase(
            string name,
            Session session,
            ServerTestConfiguration configuration,
            ReportMessageEventHandler reportMessage,
            ReportProgressEventHandler reportProgress,
            TestBase template)
        {
            m_name = name;
            m_session = session;
            m_configuration = configuration;
            m_reportMessage = reportMessage;
            m_reportProgress = reportProgress;

            if (template != null && Object.ReferenceEquals(session, template.m_session))
            {
                m_blockSize = template.BlockSize;
                m_availableNodes = template.m_availableNodes;
                m_writeableVariables = template.m_writeableVariables;
            }
            else
            {
                m_blockSize = 1000;
                m_availableNodes = new NodeIdDictionary<Node>();
                m_writeableVariables = new List<VariableNode>();
            }
        }
コード例 #2
0
ファイル: TranslatePathTest.cs プロジェクト: yuriik83/UA-.NET
 /// <summary>
 /// Creates the test object.
 /// </summary>
 public TranslatePathTest(
     Session session,
     ServerTestConfiguration configuration,
     ReportMessageEventHandler reportMessage,
     ReportProgressEventHandler reportProgress,
     TestBase template)
 : 
     base("TranslatePath", session, configuration, reportMessage, reportProgress, template)
 {
 }
コード例 #3
0
ファイル: SessionTest.cs プロジェクト: OPCFoundation/UA-.NET
 /// <summary>
 /// Creates the test object.
 /// </summary>
 public SessionTest(
     Session session,
     ServerTestConfiguration configuration,
     ReportMessageEventHandler reportMessage,
     ReportProgressEventHandler reportProgress,
     TestBase template)
 : 
     base("Activate", session, configuration, reportMessage, reportProgress, template)
 {
     m_errorEvent = new ManualResetEvent(false);
     m_messages = new Dictionary<uint,List<uint>>();
 }
コード例 #4
0
ファイル: BrowseTest.cs プロジェクト: yuriik83/UA-.NET
 /// <summary>
 /// Creates the test object.
 /// </summary>
 public BrowseTest(
     Session session,
     ServerTestConfiguration configuration,
     ReportMessageEventHandler reportMessage,
     ReportProgressEventHandler reportProgress,
     TestBase template)
 : 
     base("Browse", session, configuration, reportMessage, reportProgress, template)
 {
     m_view = new ViewDescription();
     m_view.ViewId = null;
     m_view.Timestamp = DateTime.MinValue;
     m_view.ViewVersion = 0;
     m_maxReferencesPerNode = 0;
 }
コード例 #5
0
 /// <summary>
 /// Creates the test object.
 /// </summary>
 public SubscribeTest(
     Session session,
     ServerTestConfiguration configuration,
     ReportMessageEventHandler reportMessage,
     ReportProgressEventHandler reportProgress,
     TestBase template)
 : 
     base("Subscribe", session, configuration, reportMessage, reportProgress, template)
 {
     m_subscriptions = new List<Subscription>();
     m_errorEvent = new ManualResetEvent(false);
     m_acknowledgements = new SubscriptionAcknowledgementCollection();
     m_publishPipelineDepth = 10;
     m_idealTimingError = 400;
     m_maximumTimingError = 500;
 }
コード例 #6
0
ファイル: CallTest.cs プロジェクト: yuriik83/UA-.NET
 /// <summary>
 /// Creates the test object.
 /// </summary>
 public CallTest(
     Session session,
     ServerTestConfiguration configuration,
     ReportMessageEventHandler reportMessage,
     ReportProgressEventHandler reportProgress,
     TestBase template)
 : 
     base("Call", session, configuration, reportMessage, reportProgress, template)
 {
     m_generator = new Opc.Ua.Test.DataGenerator(new Opc.Ua.Test.RandomSource(configuration.Seed));
     m_generator.NamespaceUris = Session.NamespaceUris;
     m_generator.ServerUris = Session.ServerUris;
     m_generator.MaxArrayLength = 3;
     m_generator.MaxStringLength = 10;
     m_generator.MaxXmlElementCount = 3;
     m_generator.MaxXmlAttributeCount = 3;
 }
コード例 #7
0
ファイル: MonitoredItemTest.cs プロジェクト: yuriik83/UA-.NET
        /// <summary>
        /// Creates the test object.
        /// </summary>
        public MonitoredItemTest(
            Session session,
            ServerTestConfiguration configuration,
            ReportMessageEventHandler reportMessage,
            ReportProgressEventHandler reportProgress,
            TestBase template)
        : 
            base("MonitoredItem", session, configuration, reportMessage, reportProgress, template)
        {
            m_generator = new Opc.Ua.Test.DataGenerator(new Opc.Ua.Test.RandomSource(configuration.Seed));
            m_generator.NamespaceUris = Session.NamespaceUris;
            m_generator.ServerUris = Session.ServerUris;
            m_generator.MaxArrayLength = 3;
            m_generator.MaxStringLength = 10;
            m_generator.MaxXmlElementCount = 3;
            m_generator.MaxXmlAttributeCount = 3;
            m_comparer = new Opc.Ua.Test.DataComparer(Session.MessageContext);
            m_comparer.ThrowOnError = false;
            
            m_errorEvent = new ManualResetEvent(false);
            m_maximumTimingError = 300;

            m_variables = new List<TestVariable>();    
        }
コード例 #8
0
 /// <summary>
 /// Used to log errors during a test run.
 /// </summary>
 private void Report(TestBase test, double current, double final)
 {
     Report(current, final);
 }
コード例 #9
0
 /// <summary>
 /// Used to log errors during a test run.
 /// </summary>
 private void Report(TestBase test, string format, params object[] args)
 {
     Report(format, args);
 }