public CentralConfigResponseParserTests() { _parser = new CentralConfigurationResponseParser(new NoopLogger()); _correctResponse = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Headers = { ETag = new EntityTagHeaderValue("\"33a64df551425fcc55e4d42a148795d9f25f89d4\"") } }; }
public void ParseHttpResponse_ShouldLogUnknownKeys() { // Arrange var testLogger = new TestLogger(LogLevel.Information); var parser = new CentralConfigurationResponseParser(testLogger); // Act parser.ParseHttpResponse(_correctResponse, "{\"unknownKey\": \"value\"}"); // Assert testLogger.Lines.Count.Should().Be(1); testLogger.Lines[0] .Should() .Contain( "Central configuration response contains keys that are not in the list of options that can be changed after Agent start: `[unknownKey, value]'"); }