Remco,
I am trying to setup an engine mode to run specific tests during check-in. I have created a CategoryAttribute per the documentation, applied it to a method and created the engine mode.
I added the Categories column to the test window. NCrunch is not recognizing the category.
Below is the definition of the CategoryAttribute. It is in the same code file as other attributes that I am using.
Thanks,
Patrick
Quote:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NCrunch.Framework
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Assembly, AllowMultiple = true)]
public class RequiresCapabilityAttribute : Attribute
{
public RequiresCapabilityAttribute(string capabilityName)
{
CapabilityName = capabilityName;
}
public string CapabilityName { get; private set; }
}
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Assembly, AllowMultiple = true)]
public class CategoryAttribute : Attribute
{
public CategoryAttribute(string category)
{
CategoryName = category;
}
public string CategoryName { get; private set; }
}
public abstract class ResourceUsageAttribute : Attribute
{
private readonly string[] _resourceNames;
public ResourceUsageAttribute(params string[] resourceName)
{
_resourceNames = resourceName;
}
public string[] ResourceNames
{
get { return _resourceNames; }
}
}
public class ExclusivelyUsesAttribute : ResourceUsageAttribute
{
public ExclusivelyUsesAttribute(params string[] resourceName)
: base(resourceName) { }
}
}