Reputation: 343
I am having troubles creating an addon for nunit. I think I have done the necessary steps, but for some reason I do not see my created addon in the nunit tools addon list. I have created a new project in c# and referenced nunit.core and nunit.core.interfaces from my nunit installation directory. Then I build it and copy over the dll into the addins directory.
Here is my class:
using System;
using System.Text;
using NUnit.Core.Extensibility;
using NUnit.Core;
[NUnitAddinAttribute(Type = ExtensionType.Core, Name = "Test Addin", Description = "A test addin.")]
public class CTestingAddin : IAddin, EventListener
{
#region IAddin Members
public bool Install(IExtensionHost host)
{
IExtensionPoint listeners = host.GetExtensionPoint("EventListeners");
if (listeners == null)
return false;
listeners.Install(this);
return true;
}
#endregion
#region EventListener Members
public void RunStarted(string name, int testCount)
{
}
public void RunFinished(Exception exception)
{
}
public void RunFinished(TestResult result)
{
}
public void SuiteFinished(TestResult result)
{
}
public void SuiteStarted(TestName testName)
{
}
public void TestFinished(TestResult result)
{
}
public void TestOutput(TestOutput testOutput)
{
}
public void TestStarted(TestName testName)
{
Console.WriteLine("EVENTLISTENER: Test has started");
}
public void UnhandledException(Exception exception)
{
}
#endregion
}
I don't see anything in the addons when I open up nunit. Any ideas what could keep me from seeing this addon and getting it loaded.
Thanks
Upvotes: 2
Views: 636
Reputation: 343
I found my answer. Apparently the eventlistener doesn't show up in the addons, I just ran my test and it was running my listener even though it wasn't showing up on the addons.
Upvotes: 0