public RegexTraitPair(string regex, string name, string value)
 {
     Regex = regex;
     Trait = new Trait(name, value);
 }
 private static VsTrait ToVsTrait(this Trait trait)
 {
     return(new VsTrait(trait.Name, trait.Value));
 }
        private void AssertFindsTestWithTraits(string displayName, Trait[] traits)
        {
            File.Exists(SampleTestToUse)
                .Should()
                .BeTrue("Build SampleTests in Debug and Release mode before executing this test");

            GoogleTestDiscoverer discoverer = new GoogleTestDiscoverer(TestEnvironment);
            List<TestCase> tests = discoverer.GetTestsFromExecutable(SampleTestToUse).ToList();

            TestCase testCase = tests.Find(tc => tc.Traits.Count == traits.Length && tc.DisplayName.StartsWith(displayName));
            testCase.Should().NotBeNull($"Test not found: {displayName}, {traits.Length}");

            foreach (Trait trait in traits)
            {
                Trait foundTrait = testCase.Traits.FirstOrDefault(T => trait.Name == T.Name && trait.Value == T.Value);
                foundTrait.Should().NotBeNull("Didn't find trait: (" + trait.Name + ", " + trait.Value + ")");
            }
        }