Ejemplo n.º 1
0
        public void Does_not_log_config_on_start()
        {
            var config = ConfigurationFactory.ParseString("akka.log-config-on-start = off")
                         .WithFallback(DefaultConfig);

            var system = new ActorSystemImpl(Guid.NewGuid().ToString(), config);

            // Actor system should be started to attach the EventFilterFactory
            system.Start();

            var eventFilter = new EventFilterFactory(new TestKit.Xunit2.TestKit(system));

            // Notice here we forcedly start actor system again to monitor how it processes
            eventFilter.Info().Expect(0, () => system.Start());

            system.Terminate();
        }
Ejemplo n.º 2
0
        public void Logs_config_on_start_with_info_level()
        {
            var config = ConfigurationFactory.ParseString("akka.log-config-on-start = on")
                         .WithFallback(DefaultConfig);

            var system = new ActorSystemImpl(Guid.NewGuid().ToString(), config, ActorSystemSetup.Empty);

            // Actor system should be started to attach the EventFilterFactory
            system.Start();

            var eventFilter = new EventFilterFactory(new TestKit.Xunit2.TestKit(system));

            // Notice here we forcedly start actor system again to monitor how it processes
            var expected = "log-config-on-start : on";

            eventFilter.Info(contains: expected).ExpectOne(() => system.Start());

            system.Terminate();
        }