示例#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);
        }
示例#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;
        }
示例#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);
        }