Here are the examples of the csharp api NUnit.Util.TestLoader.UnloadTest() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
Source : TestLoader.cs
with MIT License
from roozbehid
with MIT License
from roozbehid
public void UnloadProject()
{
string testFileName = TestFileName;
try
{
events.FireProjectUnloading( testFileName );
if ( IsTestLoaded )
UnloadTest();
testProject.Changed -= new ProjectEventHandler( OnProjectChanged );
testProject = null;
events.FireProjectUnloaded( testFileName );
}
catch (Exception exception )
{
lastException = exception;
events.FireProjectUnloadFailed( testFileName, exception );
}
}
19
Source : TestLoader.cs
with MIT License
from roozbehid
with MIT License
from roozbehid
private void OnProjectChanged( object sender, ProjectEventArgs e )
{
switch ( e.type )
{
case ProjectChangeType.ActiveConfig:
case ProjectChangeType.Other:
if( TestProject.IsLoadable )
TryToLoadOrReloadTest();
break;
case ProjectChangeType.AddConfig:
case ProjectChangeType.UpdateConfig:
if ( e.configName == TestProject.ActiveConfigName && TestProject.IsLoadable )
TryToLoadOrReloadTest();
break;
case ProjectChangeType.RemoveConfig:
if ( IsTestLoaded && TestProject.Configs.Count == 0 )
UnloadTest();
break;
default:
break;
}
}