// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 using System; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Text; namespace AWS.Deploy.CLI.Common.UnitTests.Utilities { internal static class SystemIOUtilities { public static string ResolvePath(string projectName) { var testsPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); while (testsPath != null && !string.Equals(new DirectoryInfo(testsPath).Name, "test", StringComparison.OrdinalIgnoreCase)) { testsPath = Directory.GetParent(testsPath).FullName; } return Path.Combine(testsPath, "..", "testapps", projectName); } } }