Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServerForm"/> class.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="application">The application.</param>
 public ServerForm(StandardServer server, ApplicationConfiguration configuration, CASApplicationInstance application)
 {
     InitializeComponent();
     m_application = application;
     m_server      = server;
     this.ServerDiagnosticsCTRL.Initialize(m_server, configuration);
     ApplicationCertificate.DisplayUaTcpImplementation(x => this.Text = x, this.Text, configuration);
     m_server.CertificateValidator.CertificateValidation += new CertificateValidationEventHandler(CertificateValidator_CertificateValidation);
     TrayIcon.Text = this.Text;
 }
Example #2
0
 public void DisplayUaTcpImplementationForDefaultConfigurationTest()
 {
     using (Main _main = new Main())
     {
         _main.CreateDefaultConfiguration();
         CASConfiguration _default  = _main.Configuration;
         string           _result   = null;
         string           _formText = "Form text";
         ApplicationCertificate.DisplayUaTcpImplementation(x => _result = x, _formText, _default);
         Assert.IsNull(_result);
     }
 }
Example #3
0
 public void DisplayUaTcpImplementationForDemoConfigurationTest()
 {
     using (Main _main = new Main())
     {
         _main.ReadConfiguration(AssemblyInitializeClass.CASConfigurationFileInfo);
         Assert.IsNotNull(_main.Configuration);
         Assert.AreEqual <int>(0, _main.Configuration.TransportConfigurations.Count); //TODO the configuration contains empty array ??!
         string _result   = null;
         string _formText = "Form text";
         ApplicationCertificate.DisplayUaTcpImplementation(x => _result = x, _formText, _main.Configuration);
         Assert.IsNull(_result);
     }
 }