in BoostTestAdapter/Discoverers/VSDiscoveryVisitor.cs [117:161]
private VSTestCase GenerateTestCase(TestCase testCase)
{
VSTestCase test = new VSTestCase(
testCase.FullyQualifiedName,
BoostTestExecutor.ExecutorUri,
this.Source
);
test.DisplayName = testCase.Name;
if (testCase.Source != null)
{
// NOTE As of Boost 1.61, this warning might be triggered when BOOST_DATA_TEST_CASEs are used due to irregular DOT output
if (!Path.IsPathRooted(testCase.Source.File) && this.OutputLog)
{
Logger.Info(Resources.RelativePathsInUse);
this.OutputLog = false;
}
test.CodeFilePath = testCase.Source.File;
test.LineNumber = testCase.Source.LineNumber;
}
// Register the test suite as a trait
test.Traits.Add(new Trait(VSTestModel.TestSuiteTrait, GetParentFullyQualifiedName(testCase)));
// Register enabled and disabled as traits
test.Traits.Add(new Trait(VSTestModel.StatusTrait, (testCase.DefaultEnabled ? VSTestModel.TestEnabled : VSTestModel.TestDisabled)));
TestUnit unit = testCase;
while (unit != null)
{
foreach (string label in unit.Labels)
{
// Register each and every label as an individual trait
test.Traits.Add(new Trait(label, string.Empty));
}
// Test cases inherit the labels of parent test units
// Reference: http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/tests_organization/tests_grouping.html
unit = unit.Parent;
}
return test;
}