protected override string GetDisplayName(IAttributeInfo factAttribute, string displayName)
    {
        string[] nameParts;


        // The base display name will be the full name of
        // the method (namespace + class + method name).
        // Add the handler name to the start of the method name.
        nameParts = BaseDisplayName.Split('.');
        nameParts[nameParts.Length - 1] = $"[{HandlerName}] {nameParts[nameParts.Length - 1]}";

        return(string.Join(".", nameParts));
    }
Пример #2
0
    protected override string GetDisplayName(IAttributeInfo factAttribute, string displayName)
    {
        string[] nameParts;


        // The display name of the underlying test case will be the
        // full name of the method (namespace + class + method name).
        // Add the handler name before the method name, and replace
        // the method name with the name of the custom test.
        nameParts = BaseDisplayName.Split('.');
        nameParts[nameParts.Length - 1] = $"[{HandlerName}] {_customTestName}";

        return(string.Join(".", nameParts));
    }