private static string GetTestFilters(OptProfTrainingConfiguration config) { var productTests = config.Products?.Any() == true ? config.Products.SelectMany(x => x.Tests.SelectMany(y => y.TestCases)) : Enumerable.Empty <string>(); var assemblyTests = config.Assemblies?.Any() == true ? config.Assemblies.SelectMany(x => x.Tests.SelectMany(y => y.TestCases)) : Enumerable.Empty <string>(); return(string.Join( "|", productTests .Concat(assemblyTests) .Distinct() .Select(x => $"FullyQualifiedName={x}"))); }
private static string GetTestContainers(OptProfTrainingConfiguration config) { var productContainers = config.Products?.Any() == true ? config.Products.SelectMany(x => x.Tests.Select(y => y.Container + ".dll")) : Enumerable.Empty <string>(); var assemblyContainers = config.Assemblies?.Any() == true ? config.Assemblies.SelectMany(x => x.Tests.Select(y => y.Container + ".dll")) : Enumerable.Empty <string>(); return(string.Join( Environment.NewLine, productContainers .Concat(assemblyContainers) .Distinct() .Select(x => $@"<TestContainer FileName=""{x}"" />"))); }