public static IEnumerable<ITestCaseData> GetTestCases()
{
const string prefix = "MongoDB.Driver.Specifications.server_selection.tests.rtt.";
return Assembly
.GetExecutingAssembly()
.GetManifestResourceNames()
.Where(path => path.StartsWith(prefix) && path.EndsWith(".json"))
.Select(path =>
{
var definition = ReadDefinition(path);
var fullName = path.Remove(0, prefix.Length);
var data = new TestCaseData(definition);
data.SetCategory("Specifications");
data.SetCategory("server-selection");
return data.SetName(fullName.Remove(fullName.Length - 5));
});
}