NettyPropertiesTests.java (spring-boot-2.7.3) | : | NettyPropertiesTests.java (spring-boot-2.7.4) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright 2012-2021 the original author or authors. | * Copyright 2012-2022 the original author or authors. | |||
* | * | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | * You may obtain a copy of the License at | |||
* | * | |||
* https://www.apache.org/licenses/LICENSE-2.0 | * https://www.apache.org/licenses/LICENSE-2.0 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
skipping to change at line 35 | skipping to change at line 35 | |||
import static org.assertj.core.api.Assertions.assertThat; | import static org.assertj.core.api.Assertions.assertThat; | |||
/** | /** | |||
* Tests for {@link NettyProperties} | * Tests for {@link NettyProperties} | |||
* | * | |||
* @author Brian Clozel | * @author Brian Clozel | |||
*/ | */ | |||
class NettyPropertiesTests { | class NettyPropertiesTests { | |||
@Test | @Test | |||
void defaultValueShouldMatchNettys() { | void defaultValueShouldBeConsistent() { | |||
NettyProperties properties = new NettyProperties(); | ||||
ResourceLeakDetector.Level defaultLevel = (Level) ReflectionTestU tils.getField(ResourceLeakDetector.class, | ResourceLeakDetector.Level defaultLevel = (Level) ReflectionTestU tils.getField(ResourceLeakDetector.class, | |||
"DEFAULT_LEVEL"); | "DEFAULT_LEVEL"); | |||
assertThat(ResourceLeakDetector.Level.valueOf(properties.getLeakD etection().name())).isEqualTo(defaultLevel); | assertThat(defaultLevel).isEqualTo(Level.SIMPLE); | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 3 lines changed or added |