jbertram commented on code in PR #5553: URL: https://github.com/apache/activemq-artemis/pull/5553#discussion_r1991551612
########## artemis-dto/src/test/java/org/apache/activemq/artemis/dto/XmlUtilTest.java: ########## @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.artemis.dto; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class XmlUtilTest { + + @Test + public void testPropertySubstituion(@TempDir Path tempDir) throws Exception { + final String SYSTEM_PROP_NAME = "sysPropName"; + final String SYSTEM_PROP_VALUE = "sysPropValue"; + System.setProperty(SYSTEM_PROP_NAME, SYSTEM_PROP_VALUE); + + // since System.getenv() returns an immutable Map we rely here on an environment variable that is likely to exist + final String ENV_VAR_NAME = "HOME"; Review Comment: I was actually doing that before, but I saw this pattern used in another test and thought it was cleaner. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact