Esempio n. 1
0
        public void ConstructorTestMethod1()
        {
            FileInfo _configurationFile = new FileInfo(m_configurationFileName);

            Assert.IsTrue(_configurationFile.Exists, $"There is no file in path {_configurationFile.FullName}");
            ProducerConfigurationFactory _configuration = new ProducerConfigurationFactory("Configuration file path");

            Assert.IsNotNull(_configuration.Loader);
        }
Esempio n. 2
0
        public void ConstructorTestMethod1()
        {
            int      LogStartPosition   = Logger.Singleton.TraceLogList.Count;
            FileInfo _configurationFile = new FileInfo(m_configurationFileName);

            Assert.IsTrue(_configurationFile.Exists, $"There is no file in path {_configurationFile.FullName}");
            ProducerConfigurationFactory _configurationFactory = new ProducerConfigurationFactory(_configurationFile.FullName);

            Assert.IsNotNull(_configurationFactory.Loader);
            ConfigurationData _configuration = _configurationFactory.Loader();

            Assert.AreEqual <int>(4, _configuration.DataSets.Length);
            Assert.AreEqual <int>(1, _configuration.MessageHandlers.Length);
            Assert.AreEqual <AssociationRole>(AssociationRole.Producer, _configuration.MessageHandlers[0].TransportRole);
            Assert.IsTrue(_configuration.MessageHandlers[0] is MessageWriterConfiguration);
            Assert.IsNull(_configuration.TypeDictionaries);
            int LogEndPosition = Logger.Singleton.TraceLogList.Count;

            Assert.AreEqual <int>(2, LogEndPosition - LogStartPosition, $"Current number of log entries is {LogEndPosition - LogStartPosition}");
        }