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); }
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; }
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); }