Exemplo n.º 1
0
        private void FullFwAssertValid(Service service)
        {
            service.Should().NotBeNull();

            FullFwAssertValid(service.Framework);

            var expectedServiceName = AgentConfig.ServiceName
                                      ?? AbstractConfigurationReader.AdaptServiceName($"{Consts.SampleApp.SiteName}_{Consts.SampleApp.AppPoolName}");
            var expectedEnvironment = AgentConfig.Environment;

            service.Name.Should().Be(expectedServiceName);
            service.Environment.Should().Be(expectedEnvironment);
        }
Exemplo n.º 2
0
        public CentralConfigTests(ITestOutputHelper xUnitOutputHelper)
            : base(
                xUnitOutputHelper,
                envVarsToSetForSampleAppPool: new Dictionary <string, string>
        {
            { ConfigConsts.EnvVarNames.ServiceName, CustomServiceName },
            { ConfigConsts.EnvVarNames.Environment, CustomEnvironment }
        })
        {
            ConfigState = new ConfigStateC(LoggerBase);

            AgentConfig.ServiceName = AbstractConfigurationReader.AdaptServiceName(CustomServiceName);
            AgentConfig.Environment = CustomEnvironment;
        }
Exemplo n.º 3
0
        private void FullFwAssertValid(Service service)
        {
            service.Should().NotBeNull();

            FullFwAssertValid(service.Framework);

            string expectedServiceName;

            if (AgentConfig.ServiceName == null)
            {
                expectedServiceName = AbstractConfigurationReader.AdaptServiceName($"{Consts.SampleApp.SiteName}_{Consts.SampleApp.AppPoolName}");
            }
            else
            {
                expectedServiceName = AgentConfig.ServiceName;
            }
            service.Name.Should().Be(expectedServiceName);
        }