public void Initialization()
        {
            DistributorServiceTestFacade distributor = new DistributorServiceTestFacade();

            distributor.InitializeComponent();
            Assert.IsNotNull(distributor);
            Assert.AreEqual(ServiceStatus.OK, distributor.Status);

            using (var configurationSource = new SystemConfigurationSource(false))
            {
                MsmqDistributorSettings settings = MsmqDistributorSettings.GetSettings(configurationSource);

                Assert.AreEqual(settings.ServiceName, distributor.ApplicationName);

                // force log entry
                distributor.EventLogger
                .LogServiceFailure(
                    string.Empty,
                    new Exception("simulated exception - forced event logger flush"),
                    TraceEventType.Error);

                Assert.IsTrue(CommonUtil.LogEntryExists(Resources.InitializeComponentStarted), "init begin");
                Assert.IsTrue(CommonUtil.LogEntryExists(Resources.InitializeComponentCompleted), "init end");
            }
        }
        public void Initialization()
        {
            DistributorServiceTestFacade distributor = new DistributorServiceTestFacade();
            distributor.InitializeComponent();
            Assert.IsNotNull(distributor);
            Assert.AreEqual(ServiceStatus.OK, distributor.Status);
            Assert.AreEqual("Enterprise Library Logging Distributor Service", distributor.ApplicationName);

            // force log entry
            this.eventLogger.WriteToLog(new Exception("simulated exception - forced event logger flush"), Severity.Error);

            Assert.IsTrue(CommonUtil.LogEntryExists(SR.InitializeComponentStarted), "init begin");
            Assert.IsTrue(CommonUtil.LogEntryExists(SR.InitializeComponentCompleted), "init end");
        }
        public void Initialization()
        {
            DistributorServiceTestFacade distributor = new DistributorServiceTestFacade();

            distributor.InitializeComponent();
            Assert.IsNotNull(distributor);
            Assert.AreEqual(ServiceStatus.OK, distributor.Status);
            Assert.AreEqual("Enterprise Library Logging Distributor Service", distributor.ApplicationName);

            // force log entry
            this.eventLogger.WriteToLog(new Exception("simulated exception - forced event logger flush"), Severity.Error);

            Assert.IsTrue(CommonUtil.LogEntryExists(SR.InitializeComponentStarted), "init begin");
            Assert.IsTrue(CommonUtil.LogEntryExists(SR.InitializeComponentCompleted), "init end");
        }
		public void Initialization()
		{
			DistributorServiceTestFacade distributor = new DistributorServiceTestFacade();
			distributor.InitializeComponent();
			Assert.IsNotNull(distributor);
			Assert.AreEqual(ServiceStatus.OK, distributor.Status);

            MsmqDistributorSettings settings = MsmqDistributorSettings.GetSettings(new SystemConfigurationSource());

            Assert.AreEqual(settings.ServiceName, distributor.ApplicationName);

			// force log entry
            distributor.EventLogger.LogServiceFailure(string.Empty, new Exception("simulated exception - forced event logger flush"), TraceEventType.Error);

			Assert.IsTrue(CommonUtil.LogEntryExists(Resources.InitializeComponentStarted), "init begin");
			Assert.IsTrue(CommonUtil.LogEntryExists(Resources.InitializeComponentCompleted), "init end");
		}