private TestSuite(string testEnginePath, TestSuiteInstallation testSuiteInstallation, IStorageNode storageRoot)
        {
            TestEnginePath = testEnginePath;

            Id = testSuiteInstallation.Id;

            Name = testSuiteInstallation.Name;

            Description = testSuiteInstallation.Description;

            Removed = testSuiteInstallation.Removed;

            InstallMethod = testSuiteInstallation.InstallMethod;

            Version = testSuiteInstallation.Version;

            StorageRoot = storageRoot;

            // check if Plugin/config.xml can be found in TestSuite, if not then throw a new exception.
            string configXmlPath = Path.Combine(StorageRoot.GetNode(TestSuiteConsts.PluginFolderName).AbsolutePath, TestSuiteConsts.PluginConfigXml);

            if (!File.Exists(configXmlPath))
            {
                throw new Exception($"TestSuite requires plugin xml:{configXmlPath}!");
            }
            this.TestSuiteConfigFilePath = configXmlPath;
        }
        private static string GetTestSuiteVersion(IStorageNode testSuiteInstallNode)
        {
            var binNode = testSuiteInstallNode.GetNode(TestSuiteConsts.Bin);

            using var versionFile = binNode.ReadFile(TestSuiteConsts.VersionFile);
            using var rs          = new StreamReader(versionFile);
            var version = rs.ReadLine();

            return(version);
        }
        private Configuration(TestSuiteConfiguration testSuiteConfiguration, ITestSuite testSuite, IStorageNode storageRoot)
        {
            Id = testSuiteConfiguration.Id;

            TestSuite = testSuite;

            Name = testSuiteConfiguration.Name;

            Description = testSuiteConfiguration.Description;

            StorageRoot = storageRoot;

            var ptfConfigStorage = StorageRoot.GetNode(ConfigurationConsts.PtfConfig);

            PtfConfig = new PtfConfig(ptfConfigStorage.GetFiles().ToList());

            LoadFeatureMappingFromXml();
        }